\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 : 

Type

$isIndex

$isIndex : 

Type

Methods

__construct()

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

Creates a new property path builder.

Parameters

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

The path to initially store in the builder. Optional.

append()

append(\Symfony\Component\PropertyAccess\PropertyPathInterface|string  $path, integer  $offset, integer  $length) 

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

Parameters

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

The path to append

integer $offset

The offset where the appended piece starts in $path

integer $length

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

appendIndex()

appendIndex(string  $name) 

Appends an index element to the current path.

Parameters

string $name

The name of the appended index

appendProperty()

appendProperty(string  $name) 

Appends a property element to the current path.

Parameters

string $name

The name of the appended property

remove()

remove(integer  $offset, integer  $length = 1) 

Removes elements from the current path.

Parameters

integer $offset

The offset at which to remove

integer $length

The length of the removed piece

Throws

\Symfony\Component\PropertyAccess\Exception\OutOfBoundsException

if offset is invalid

replace()

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

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

Parameters

integer $offset

The offset at which to replace

integer $length

The length of the piece to replace

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

The path to insert

integer $pathOffset

The offset where the inserted piece starts in $path

integer $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

replaceByIndex()

replaceByIndex(integer  $offset, string  $name = null) 

Replaces a property element by an index element.

Parameters

integer $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

replaceByProperty()

replaceByProperty(integer  $offset, string  $name = null) 

Replaces an index element by a property element.

Parameters

integer $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

getLength()

getLength() : integer

Returns the length of the current path.

Returns

integer —

The path length

__toString()

__toString() : string

Returns the current property path as string.

Returns

string —

The property path as string

resize()

resize(integer  $offset, integer  $cutLength, integer  $insertionLength) 

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

Parameters

integer $offset

The offset where the removed chunk starts

integer $cutLength

The length of the removed chunk

integer $insertionLength

The length of the inserted chunk