Copied!

Default implementation of {@link PropertyPathInterface}.

CloneableInstantiableIterable
Constants
public Symfony\Component\PropertyAccess\PropertyPath::SINGULAR_SEPARATOR = '|'
 

Character used for separating between plural and singular of an element.

Methods
public __construct(self|string $propertyPath)
 

Constructs a property path from a string.

  • throws \InvalidArgumentException If the given path is not a string
  • throws \InvalidPropertyPathException If the syntax of the property path is not valid
public __toString() : string
public getElement(int $index) : string
public getElements() : array
public getIterator() : Symfony\Component\PropertyAccess\PropertyPathIteratorInterface
 

Returns a new iterator for this path.

public getLength() : int
public getParent() : ?Symfony\Component\PropertyAccess\PropertyPathInterface
public isIndex(int $index) : bool
public isNullSafe(int $index) : bool
public isProperty(int $index) : bool
Properties
private array $elements = []
 

The elements of the property path.

  • var list<string>
private array $isIndex = []
 

Contains a Boolean for each property in $elements denoting whether this element is an index. It is a property otherwise.

  • var bool[]
private array $isNullSafe = []
 

Contains a Boolean for each property in $elements denoting whether this element is optional or not.

  • var bool[]
private int $length
 

The number of elements in the property path.

private string $pathAsString
 

String representation of the path.

© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration