Validator\ViolationMapper\RelativePath (Component\Form\Extension)
Symfony\Component\Form\Extension\Validator\ViolationMapper\RelativePath
class RelativePath extends PropertyPath
Constants
SINGULAR_SEPARATOR | Character used for separating between plural and singular of an element. |
Methods
__construct(FormInterface $root, string $propertyPath) | ||
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 |
FormInterface | getRoot() |
Details
public __construct(FormInterface $root, string $propertyPath)
public string __toString()
Returns the string representation of the property path
public integer getLength()
Returns the length of the property path, i.e.
the number of elements.
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.
public PropertyPathIteratorInterface getIterator()
Returns a new iterator for this path
public array getElements()
Returns the elements of the property path as array
public string getElement(integer $index)
Returns the element at the given index in the property path
public Boolean isProperty(integer $index)
Returns whether the element at the given index is a property
public Boolean isIndex(integer $index)
Returns whether the element at the given index is an array index
public FormInterface getRoot()
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Form/Extension/Validator/ViolationMapper/RelativePath.html