RelativePath
class RelativePath extends PropertyPath
Constants
SINGULAR_SEPARATOR |
Character used for separating between plural and singular of an element. |
Methods
__construct(FormInterface $root, PropertyPath|string $propertyPath)
Constructs a property path from a string.
int
getLength()
Returns the length of the property path, i.e. the number of elements.
from PropertyPath
string
getElement(int $index)
Returns the element at the given index in the property path.
from PropertyPath
bool
isProperty(int $index)
Returns whether the element at the given index is a property.
from PropertyPath
bool
isIndex(int $index)
Returns whether the element at the given index is an array index.
from PropertyPath
getRoot()
No description
Details
__construct(FormInterface $root, PropertyPath|string $propertyPath)
Constructs a property path from a string.
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.