PropertyPathBuilder::remove()

remove(int $offset, int $length = 1) Removes elements from the current path. Parameters int $offset The offset at which to remove int $length The length of the removed piece Exceptions OutOfBoundsException if offset is invalid

PropertyPathBuilder::getPropertyPath()

PropertyPathInterface getPropertyPath() Returns the current property path. Return Value PropertyPathInterface The constructed property path

PropertyPathBuilder::getLength()

int getLength() Returns the length of the current path. Return Value int The path length

PropertyPathBuilder::appendProperty()

appendProperty(string $name) Appends a property element to the current path. Parameters string $name The name of the appended property

PropertyPathBuilder::appendIndex()

appendIndex(string $name) Appends an index element to the current path. Parameters string $name The name of the appended index

PropertyPathBuilder::append()

append(PropertyPathInterface|string $path, int $offset, int $length) Appends a (sub-) path to the current path. Parameters PropertyPathInterface|string $path The path to append int $offset The offset where the appended piece starts in $path. int $length The length of the appended piece If 0, the full path is appended.

PropertyPathBuilder

class PropertyPathBuilder Methods __construct(null|PropertyPathInterface|string $path = null) Creates a new property path builder. append(PropertyPathInterface|string $path, int $offset, int $length) Appends a (sub-) path to the current path. appendIndex(string $name) Appends an index element to the current path. appendProperty(string $name) Appends a property element to the current path. remove(int $offset, int $length = 1) Removes elements from the current path.

PropertyPath::isProperty()

bool isProperty(int $index) Returns whether the element at the given index is a property. Parameters int $index The index in the property path Return Value bool Whether the element at this index is a property Exceptions OutOfBoundsException If the offset is invalid

PropertyPath::isIndex()

bool isIndex(int $index) Returns whether the element at the given index is an array index. Parameters int $index The index in the property path Return Value bool Whether the element at this index is an array index Exceptions OutOfBoundsException If the offset is invalid

PropertyPath::getParent()

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