ArrayObjectA

Extends \ArrayObject Implements \JsonSerializable

Advanced array object

package

ArrayObjectA

subpackage

Utility

Methods

Remove all elements that not satisfy $callback

filter(callable $callback, boolean $resetKeys = true) : \ArrayObjectA

Arguments

$callback

callable

$resetKeys

boolean

Response

\ArrayObjectA

Group elements of array

group(callable $callback) : \ArrayObjectA

Arguments

$callback

callable

Response

\ArrayObjectA

For json serialization

jsonSerialize() : array

Response

array

Apply callback to each element of array

map(callable $callback) : \ArrayObjectA

Arguments

$callback

callable

Response

\ArrayObjectA

Merge arrays

merge(\ArrayObjectA $Array) : \ArrayObjectA

Arguments

$Array

\ArrayObjectA

Response

\ArrayObjectA

Multisort array

multisort(array|string $params) : \ArrayObjectA
see \ArraySort::multisort

Arguments

$params

array|string

Response

\ArrayObjectA

Reduces array into single value using $callback

reduce(callable $callback, mixed $init = null) : mixed

Arguments

$callback

callable

$init

mixed

Initial value

Response

mixed

Reset array keys to integer from 0 to n

resetKeys() : \ArrayObjectA

Response

\ArrayObjectA

Slice array

slice(integer $offset, integer $length = null, boolean $preserveKeys = false) : \ArrayObjectA

Arguments

$offset

integer

$length

integer

$preserveKeys

boolean

Response

\ArrayObjectA

Make unique

unique(callable $callback) : \ArrayObjectA

Arguments

$callback

callable

Groupping callback

Response

\ArrayObjectA