Symfony\Component\PropertyAccess\PropertyPath
Default implementation of {@link PropertyPathInterface}.
- Author: Bernhard Schussek <bschussek@gmail.com>
Synopsis
class PropertyPath
implements
IteratorAggregate,PropertyPathInterface
{
- // constants
- const SINGULAR_SEPARATOR = '|';
- // members
- private array $elements;
- private array $singulars;
- private integer $length;
- private array $isIndex;
- private string $pathAsString;
- // methods
- public void __construct()
- public void __toString()
- public void getLength()
- public void getParent()
- public PropertyPathIteratorInterface getIterator()
- public void getElements()
- public void getElement()
- public void isProperty()
- public void isIndex()
Hierarchy
Extended by
Implements
Constants
Name | Value |
---|---|
SINGULAR_SEPARATOR | '|' |
Members
private
- $elements
—
array
The elements of the property path - $isIndex
—
array
Contains a Boolean for each property in $elements denoting whether this element is an index. It is a property otherwise. - $length
—
integer
The number of elements in the property path - $pathAsString
—
string
String representation of the path - $singulars
—
array
The singular forms of the elements in the property path.
Methods
public
- __construct() — Constructs a property path from a string.
- __toString() — {@inheritdoc}
- getElement() — {@inheritdoc}
- getElements() — {@inheritdoc}
- getIterator() — Returns a new iterator for this path
- getLength() — {@inheritdoc}
- getParent() — {@inheritdoc}
- isIndex() — {@inheritdoc}
- isProperty() — {@inheritdoc}