Copied!

A sequence of property names or array indices.

AbstractInterface
Methods
public abstract __toString() : string
 

Returns the string representation of the property path.

public abstract getElement(int $index) : string
 

Returns the element at the given index in the property path.

  • param int $index The index key
  • throws \Exception\OutOfBoundsException If the offset is invalid
public abstract getElements() : array
 

Returns the elements of the property path as array.

  • return list<string>
public abstract getLength() : int
 

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

public abstract getParent() : ?self
 

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 abstract isIndex(int $index) : bool
 

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

  • param int $index The index in the property path
  • throws \Exception\OutOfBoundsException If the offset is invalid
public abstract isNullSafe(int $index) : bool
 

Returns whether the element at the given index is null safe.

public abstract isProperty(int $index) : bool
 

Returns whether the element at the given index is a property.

  • param int $index The index in the property path
  • throws \Exception\OutOfBoundsException If the offset is invalid
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration