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 28
static ArrayHash from(array $array, bool $recursive = true)

Transforms array to ArrayHash.

Parameters

array $array
bool $recursive

Return Value

ArrayHash

at line 45
RecursiveArrayIterator getIterator()

Returns an iterator over all items.

Return Value

RecursiveArrayIterator

at line 54
int count()

Returns items count.

Return Value

int

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

Replaces or appends a item.

Parameters

array-key $key
T $value

Return Value

void

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

Returns a item.

Parameters

array-key $key

Return Value

T

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

Determines whether a item exists.

Parameters

array-key $key

Return Value

bool

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

Removes the element from this list.

Parameters

array-key $key

Return Value

void