Custom framework ArrayObject implementation

Extends version-specific "abstract" implementation.

package Default

 Methods

Constructor

__construct(array $input = array(), integer $flags = self::STD_PROP_LIST, string $iteratorClass = 'ArrayIterator'

Parameters

$input

array

$flags

integer

$iteratorClass

string

Returns the value at the specified key by reference

__get(mixed $key) : mixed

Parameters

$key

mixed

Returns

mixed

Returns whether the requested key exists

__isset(mixed $key) : boolean

Parameters

$key

mixed

Returns

boolean

Sets the value at the specified key to value

__set(mixed $key, mixed $value) : void

Parameters

$key

mixed

$value

mixed

Unsets the value at the specified key

__unset(mixed $key) : void

Parameters

$key

mixed

Appends the value

append(mixed $value) : void

Parameters

$value

mixed

Sort the entries by value

asort() : void

Get the number of public properties in the ArrayObject

count() : integer

Returns

integer

Exchange the array for another one.

exchangeArray(array|\Zend\Stdlib\ArrayObject $data) : array

Parameters

$data

array\Zend\Stdlib\ArrayObject

Returns

array

Creates a copy of the ArrayObject.

getArrayCopy() : array

Returns

array

Gets the behavior flags.

getFlags() : integer

Returns

integer

Create a new iterator from an ArrayObject instance

getIterator() : \Iterator

Returns

\Iterator

Gets the iterator classname for the ArrayObject.

getIteratorClass() : string

Returns

string

Sort the entries by key

ksort() : void

Sort an array using a case insensitive "natural order" algorithm

natcasesort() : void

Sort entries using a "natural order" algorithm

natsort() : void

Returns whether the requested key exists

offsetExists(mixed $key) : boolean

Parameters

$key

mixed

Returns

boolean

Returns the value at the specified key

offsetGet(mixed $key) : mixed

Parameters

$key

mixed

Returns

mixed

Sets the value at the specified key to value

offsetSet(mixed $key, mixed $value) : void

Parameters

$key

mixed

$value

mixed

Unsets the value at the specified key

offsetUnset(mixed $key) : void

Parameters

$key

mixed

Serialize an ArrayObject

serialize() : string

Returns

string

Sets the behavior flags

setFlags(integer $flags) : void

Parameters

$flags

integer

Sets the iterator classname for the ArrayObject

setIteratorClass(string $class) : void

Parameters

$class

string

Sort the entries with a user-defined comparison function and maintain key association

uasort(callable $function) : void

Parameters

$function

callable

Sort the entries by keys using a user-defined comparison function

uksort(callable $function) : void

Parameters

$function

callable

Unserialize an ArrayObject

unserialize(string $data) : void

Parameters

$data

string

 Properties

 

$flag

$flag : integer

Default

 

$iteratorClass

$iteratorClass : string

Default

 

$protectedProperties

$protectedProperties : array

Default

 

$storage

$storage : array

Default

 Constants

 

Entries can be accessed as properties (read and write).

ARRAY_AS_PROPS = 2 
 

Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.).

STD_PROP_LIST = 1