class ArrayHash extends stdClass implements ArrayAccess, Countable, IteratorAggregate

Provides objects to work as array.

Methods

static ArrayHash
from(array $array, bool $recursive = true)

Transforms array to ArrayHash.

getIterator()

Returns an iterator over all items.

int
count()

Returns items count.

void
offsetSet(string|int $key, T $value)

Replaces or appends a item.

mixed
offsetGet(string|int $key)

Returns a item.

bool
offsetExists(string|int $key)

Determines whether a item exists.

void
offsetUnset(string|int $key)

Removes the element from this list.

Details

at line 25
static ArrayHash from(array $array, bool $recursive = true)

Transforms array to ArrayHash.

Parameters

array $array
bool $recursive

Return Value

ArrayHash

at line 42
RecursiveArrayIterator getIterator()

Returns an iterator over all items.

Return Value

RecursiveArrayIterator

at line 51
int count()

Returns items count.

Return Value

int

at line 62
void offsetSet(string|int $key, T $value)

Replaces or appends a item.

Parameters

string|int $key
T $value

Return Value

void

at line 77
mixed offsetGet(string|int $key)

Returns a item.

Parameters

string|int $key

Return Value

mixed

at line 87
bool offsetExists(string|int $key)

Determines whether a item exists.

Parameters

string|int $key

Return Value

bool

at line 97
void offsetUnset(string|int $key)

Removes the element from this list.

Parameters

string|int $key

Return Value

void