\Symfony\Component\PropertyAccessPropertyPathBuilder

Summary

Methods
Properties
Constants
__construct()
append()
appendIndex()
appendProperty()
remove()
replace()
replaceByIndex()
replaceByProperty()
getLength()
getPropertyPath()
__toString()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
resize()
$elements
$isIndex
N/A

Properties

$elements

$elements

$isIndex

$isIndex

Methods

__construct()

__construct(\Symfony\Component\PropertyAccess\PropertyPathInterface|string|null  $path = null) : mixed

Creates a new property path builder.

Parameters

\Symfony\Component\PropertyAccess\PropertyPathInterface|string|null $path

The path to initially store in the builder. Optional.

Returns

mixed —

append()

append(\Symfony\Component\PropertyAccess\PropertyPathInterface|string  $path, int  $offset, int  $length) : mixed

Appends a (sub-) path to the current path.

Parameters

\Symfony\Component\PropertyAccess\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

Returns

mixed —

appendIndex()

appendIndex(string  $name) : mixed

Appends an index element to the current path.

Parameters

string $name

The name of the appended index

Returns

mixed —

appendProperty()

appendProperty(string  $name) : mixed

Appends a property element to the current path.

Parameters

string $name

The name of the appended property

Returns

mixed —

remove()

remove(int  $offset, int  $length = 1) : mixed

Removes elements from the current path.

Parameters

int $offset

The offset at which to remove

int $length

The length of the removed piece

Throws

\Symfony\Component\PropertyAccess\Exception\OutOfBoundsException

if offset is invalid

Returns

mixed —

replace()

replace(int  $offset, int  $length, \Symfony\Component\PropertyAccess\PropertyPathInterface|string  $path, int  $pathOffset, int  $pathLength) : mixed

Replaces a sub-path by a different (sub-) path.

Parameters

int $offset

The offset at which to replace

int $length

The length of the piece to replace

\Symfony\Component\PropertyAccess\PropertyPathInterface|string $path

The path to insert

int $pathOffset

The offset where the inserted piece starts in $path

int $pathLength

The length of the inserted piece If 0, the full path is inserted

Throws

\Symfony\Component\PropertyAccess\Exception\OutOfBoundsException

If the offset is invalid

Returns

mixed —

replaceByIndex()

replaceByIndex(int  $offset, string  $name = null) : mixed

Replaces a property element by an index element.

Parameters

int $offset

The offset at which to replace

string $name

The new name of the element. Optional

Throws

\Symfony\Component\PropertyAccess\Exception\OutOfBoundsException

If the offset is invalid

Returns

mixed —

replaceByProperty()

replaceByProperty(int  $offset, string  $name = null) : mixed

Replaces an index element by a property element.

Parameters

int $offset

The offset at which to replace

string $name

The new name of the element. Optional

Throws

\Symfony\Component\PropertyAccess\Exception\OutOfBoundsException

If the offset is invalid

Returns

mixed —

getLength()

getLength() : int

Returns the length of the current path.

Returns

int —

The path length

getPropertyPath()

getPropertyPath() : \Symfony\Component\PropertyAccess\PropertyPathInterface|null

Returns the current property path.

Returns

\Symfony\Component\PropertyAccess\PropertyPathInterface|null —

The constructed property path

__toString()

__toString() : string

Returns the current property path as string.

Returns

string —

The property path as string

resize()

resize(int  $offset, int  $cutLength, int  $insertionLength) : mixed

Resizes the path so that a chunk of length $cutLength is removed at $offset and another chunk of length $insertionLength can be inserted.

Parameters

int $offset
int $cutLength
int $insertionLength

Returns

mixed —