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.

T
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 26
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 76
T offsetGet(string|int $key)

Returns a item.

Parameters

string|int $key

Return Value

T

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

Determines whether a item exists.

Parameters

string|int $key

Return Value

bool

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

Removes the element from this list.

Parameters

string|int $key

Return Value

void