class PropertyPath extends PropertyPath
Alias for {@link \Symfony\Component\PropertyAccess\PropertyPath}.
Constants
| SINGULAR_SEPARATOR |
Character used for separating between plural and singular of an element. |
Methods
|
__construct(PropertyPath|string $propertyPath)
Constructs a property path from a string. |
||
| string |
__toString()
Returns the string representation of the property path |
from PropertyPath |
| integer |
getLength()
Returns the length of the property path, i.e. |
from PropertyPath |
| PropertyPath |
getParent()
Returns the parent property path. |
from PropertyPath |
| PropertyPathIteratorInterface |
getIterator()
Returns a new iterator for this path |
from PropertyPath |
| array |
getElements()
Returns the elements of the property path as array |
from PropertyPath |
| string |
getElement(integer $index)
Returns the element at the given index in the property path |
from PropertyPath |
| Boolean |
isProperty(integer $index)
Returns whether the element at the given index is a property |
from PropertyPath |
| Boolean |
isIndex(integer $index)
Returns whether the element at the given index is an array index |
from PropertyPath |
|
getValue($objectOrArray)
Alias for {@link PropertyAccessor::getValue()} |
||
|
setValue($objectOrArray, $value)
Alias for {@link PropertyAccessor::setValue()} |
Details
at line 31
public
__construct(PropertyPath|string $propertyPath)
Constructs a property path from a string.
in PropertyPath at line 139
public string
__toString()
Returns the string representation of the property path
in PropertyPath at line 147
public integer
getLength()
Returns the length of the property path, i.e.
the number of elements.
in PropertyPath at line 155
public PropertyPath
getParent()
Returns the parent property path.
The parent property path is the one that contains the same items as
this one except for the last one.
If this property path only contains one item, null is returned.
in PropertyPath at line 177
public PropertyPathIteratorInterface
getIterator()
Returns a new iterator for this path
in PropertyPath at line 185
public array
getElements()
Returns the elements of the property path as array
in PropertyPath at line 193
public string
getElement(integer $index)
Returns the element at the given index in the property path
in PropertyPath at line 205
public Boolean
isProperty(integer $index)
Returns whether the element at the given index is a property
in PropertyPath at line 217
public Boolean
isIndex(integer $index)
Returns whether the element at the given index is an array index
at line 41
public
getValue($objectOrArray)
Alias for {@link PropertyAccessor::getValue()}
at line 51
public
setValue($objectOrArray, $value)
Alias for {@link PropertyAccessor::setValue()}