class CascadedValueTree implements ArrayAccess, ArrayRepresentation (View source)

Represents a tree of values where undefined tree path will take their value from the nearest valid ancestor value.

Constants

NODES

VALUE

Methods

mixed
query(string|array $query, mixed $dflt = null)

No description

array
getArrayCopy()

No description

offsetGet($query)

No description

offsetSet($query, $value)

No description

offsetExists($query)

No description

offsetUnset($query)

No description

mixed
__invoke()

Alias of query() method

setKeySeparator(string $separator)

Set the separator of the string-form key path query

__construct()

No description

Details

mixed query(string|array $query, mixed $dflt = null)

Parameters

string|array $query Key path
mixed $dflt Default value

Return Value

mixed Value associated to the leaf key of $query. If the value does not exists, the value of the leaf key of the nearest ancestor is returned. Otherwise, return the default value

array getArrayCopy()

Return Value

array Array representation of the class instance

offsetGet($query)

Parameters

$query

offsetSet($query, $value)

Parameters

$query
$value

offsetExists($query)

Parameters

$query

offsetUnset($query)

Parameters

$query

mixed __invoke()

Alias of query() method

Return Value

mixed

setKeySeparator(string $separator)

Set the separator of the string-form key path query

Parameters

string $separator

__construct()