Method |
Description |
|
__construct ( array $elements = [] ) |
Construct new instance |
|
chunk ( integer $size, boolean $preserveKeys = false ) : AbstractArray |
Create a chunked version of current array. |
|
clear ( ) : AbstractArray |
Clear the current array. |
|
combine ( array $array ) : AbstractArray |
Create an array using the current array as keys and the other array as values. |
|
contains ( mixed $element ) : boolean |
Check if the given value exists in the array. |
|
containsKey ( mixed $key ) : boolean |
Check if the given key/index exists in the array. |
|
count ( ) : integer |
Returns the number of values in the array. |
|
create ( array $elements = [] ) : AbstractArray |
Create a new instance. |
|
createClone ( ) : AbstractArray |
Clone current instance to new instance. |
|
createFromJson ( string $json, integer $options, integer $depth = 512 ) : AbstractArray |
Decode a JSON string to new instance. |
|
createFromObject ( ArrayAccess $elements ) : AbstractArray |
Create a new instance filled with values from an object implementing ArrayAccess. |
|
createFromString ( string $string, string $separator ) : AbstractArray |
Explode a string to new instance by specified separator. |
|
createWithRange ( mixed $low, mixed $high, integer $step = 1 ) : AbstractArray |
Create a new instance containing a range of elements. |
|
diff ( array $array ) : AbstractArray |
Compute the current array values which not present in the given one. |
|
except ( array $keys ) : AbstractArray |
Return slice of an array except given keys. |
|
exists ( callable $func ) : boolean |
Find the given value in An array using a closure |
|
filter ( callable $func ) : AbstractArray |
Filter the current array for elements satisfying the predicate $func. |
|
find ( callable $func ) : mixed |
Returns the first occurrence of a value that satisfies the predicate $func. |
|
flip ( ) : AbstractArray |
Exchanges all keys of current array with their associated values. |
|
getIterator ( ) : Traversable |
Create an iterator over this array. |
|
getKeys ( ) : array |
Return an array all the keys of this array. |
|
getRandom ( ) : mixed |
Pick a random value out of this array. |
|
getRandomKey ( ) : mixed |
Pick a random key/index from the keys of this array. |
|
getRandomKeys ( integer $number ) : mixed |
Pick a given number of random keys/indexes out of this array. |
|
getRandomValues ( integer $number ) : array |
Pick a given number of random values with non-duplicate indexes out of the array. |
|
getValues ( ) : mixed |
Return an array of all values from this array numerically indexed. |
|
indexOf ( mixed $element ) : mixed |
Alias of search() method. Search for a given element and return
the index of its first occurrence. |
|
intersect ( array $array ) : AbstractArray |
Compute the current array values which present in the given one. |
|
intersectAssoc ( array $array ) : AbstractArray |
Compute the current array values with additional index check which present in the given one. |
|
intersectKey ( array $array ) : AbstractArray |
Compute the current array using keys for comparison which present in the given one. |
|
isAssoc ( ) : boolean |
Check whether array is associative or not. |
|
isEmpty ( ) : boolean |
Check whether the array is empty or not. |
|
isNumeric ( ) : boolean |
Check whether array is numeric or not. |
|
map ( callable $func ) : AbstractArray |
Apply the given function to the every element of the current array,
collecting the results. |
|
merge ( array $array, boolean $recursively = false ) : AbstractArray |
Merge the current array with the provided one. The latter array is overwriting. |
|
offsetExists ( mixed $offset ) : boolean |
Whether an offset exists. |
|
offsetGet ( mixed $offset ) : mixed |
Retrieve the current offset or null. |
|
offsetSet ( mixed $offset, mixed $value ) |
Set an offset for this array. |
|
offsetUnset ( mixed $offset ) |
Remove a present offset. |
|
only ( array $keys ) : AbstractArray |
Return slice of an array with just a given keys. |
|
pad ( integer $size, mixed $value ) : AbstractArray |
Pad the current array to the specified size with a given value. |
|
reduce ( callable $func, mixed | null $initial = null ) : mixed |
Reduce the array to a single value iteratively combining all values using $func. |
|
reindex ( ) : AbstractArray |
Create a numerically re-indexed array based on the current array. |
|
replace ( array $array, boolean $recursively = false ) : AbstractArray |
Replace values in the current array with values in the given one
that have the same key. |
|
reverse ( boolean $preserveKeys = false ) : AbstractArray |
Reverse the values order of the current array. |
|
search ( mixed $element ) : mixed |
Search for a given element and return the index of its first occurrence. |
|
shuffle ( ) : AbstractArray |
Randomize elements order of the current array. |
|
slice ( integer $offset, integer | null $length = null, boolean $preserveKeys = false ) : AbstractArray |
Extract a slice of the current array. |
|
unique ( integer | null $sortFlags = null ) : AbstractArray |
Remove duplicate values from the current array. |
|
walk ( callable $func, boolean $recursively = false ) : AbstractArray |
Apply the given function to the every element of the current array,
discarding the results. |
|