Interface

Symfony\Component\Form\Util\PropertyPathInterface

interface PropertyPathInterface implements PropertyPathInterface

Alias for {@link \Symfony\Component\PropertyAccess\PropertyPathInterface}.

Methods

string __toString()

Returns the string representation of the property path

from PropertyPathInterface
integer getLength()

Returns the length of the property path, i.e.

from PropertyPathInterface
PropertyPath getParent()

Returns the parent property path.

from PropertyPathInterface
array getElements()

Returns the elements of the property path as array

from PropertyPathInterface
string getElement(integer $index)

Returns the element at the given index in the property path

from PropertyPathInterface
Boolean isProperty(integer $index)

Returns whether the element at the given index is a property

from PropertyPathInterface
Boolean isIndex(integer $index)

Returns whether the element at the given index is an array index

from PropertyPathInterface

Details

in PropertyPathInterface at line 26
public string __toString()

Returns the string representation of the property path

Return Value

string The path as string

in PropertyPathInterface at line 33
public integer getLength()

Returns the length of the property path, i.e.

the number of elements.

Return Value

integer The path length

in PropertyPathInterface at line 45
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.

Return Value

PropertyPath The parent path or null

in PropertyPathInterface at line 52
public array getElements()

Returns the elements of the property path as array

Return Value

array An array of property/index names

in PropertyPathInterface at line 63
public string getElement(integer $index)

Returns the element at the given index in the property path

Parameters

integer $index The index key

Return Value

string A property or index name

Exceptions

OutOfBoundsException If the offset is invalid

in PropertyPathInterface at line 74
public Boolean isProperty(integer $index)

Returns whether the element at the given index is a property

Parameters

integer $index The index in the property path

Return Value

Boolean Whether the element at this index is a property

Exceptions

OutOfBoundsException If the offset is invalid

in PropertyPathInterface at line 85
public Boolean isIndex(integer $index)

Returns whether the element at the given index is an array index

Parameters

integer $index The index in the property path

Return Value

Boolean Whether the element at this index is an array index

Exceptions

OutOfBoundsException If the offset is invalid