NestedArray
final class NestedArray (View source)
Reads and changes values in nested arrays given by a path.
The path is a string of keys separated by slashes, eg. Servers/1/host refers to $array[Servers][1][host]
Methods
static mixed
get(string $path, array $array, mixed $default = null)
Returns value of an element in $array given by $path.
static array
set(string $path, array $array, mixed $value)
Stores value in an array
static array
remove(string $path, array $array)
Removes value from an array
Details
static mixed
get(string $path, array $array, mixed $default = null)
Returns value of an element in $array given by $path.
static array
set(string $path, array $array, mixed $value)
Stores value in an array
static array
remove(string $path, array $array)
Removes value from an array