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(array-key $key, T $value)

Replaces or appends a item.

T
offsetGet(array-key $key)

Returns a item.

bool
offsetExists(array-key $key)

Determines whether a item exists.

void
offsetUnset(array-key $key)

Removes the element from this list.

Details

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

Transforms array to ArrayHash.

Parameters

array $array
bool $recursive

Return Value

ArrayHash

at line 44
Iterator getIterator()

Returns an iterator over all items.

Return Value

Iterator

at line 55
int count()

Returns items count.

Return Value

int

at line 66
void offsetSet(array-key $key, T $value)

Replaces or appends a item.

Parameters

array-key $key
T $value

Return Value

void

at line 81
T offsetGet(array-key $key)

Returns a item.

Parameters

array-key $key

Return Value

T

at line 92
bool offsetExists(array-key $key)

Determines whether a item exists.

Parameters

array-key $key

Return Value

bool

at line 102
void offsetUnset(array-key $key)

Removes the element from this list.

Parameters

array-key $key

Return Value

void