Method |
Description |
|
append ( array $array, array $array2 ) : array |
Add the keys/values in $array2 that are not found in $array onto the end of $array. |
|
check ( mixed $data, mixed $path = null ) : boolean |
Checks if a particular path is set in an array. Tests by key name, or dot-delimited key
name, i.e.: |
|
combine ( array $data, mixed $path1 = null, mixed $path2 = null, string $groupPath = null ) : array |
Creates an associative array using a $path1 as the path to build its keys, and optionally
$path2 as path to get the values. If $path2 is not specified, all values will be
initialized to null (useful for Set::merge()). You can optionally group the values by
what is obtained when following the path specified in $groupPath. |
|
contains ( array $array1, array $array2 ) : boolean |
Determines if the array elements in $array2 are wholly contained within $array1. Works
recursively. |
|
depth ( array $data, array $options = [] ) : integer |
Counts the dimensions of an array. If $all is set to false (which is the default) it will
only consider the dimension of the first element in the array. |
|
diff ( array $val1, array $val2 ) : array |
Computes the difference between two arrays. |
|
expand ( array $data, array $options = [] ) : array |
Accepts a one-dimensional array where the keys are separated by a delimiter. |
|
extract ( array $data, string $path = null, array $options = [] ) : array |
Implements partial support for XPath 2.0. |
|
flatten ( array $data, array $options = [] ) : array |
Collapses a multi-dimensional array into a single dimension, using a delimited array path
for each array element's key, i.e. array(array('Foo' => array('Bar' => 'Far'))) becomes
array('0.Foo.Bar' => 'Far'). |
|
format ( array $data, string $format, array $keys ) : array |
Returns a series of values extracted from an array, formatted in a format string. |
|
insert ( mixed $list, mixed $path, array $data = [] ) : array |
Inserts $data into an array as defined by $path. |
|
isNumeric ( array $array = null ) : mixed |
Checks to see if all the values in the array are numeric. |
|
matches ( array $data, mixed $conditions, integer $i = null, integer $length = null ) : boolean |
This function can be used to see if a single item or a given XPath
match certain conditions. |
|
merge ( array $array1, array $array2 ) : array |
This method can be thought of as a hybrid between PHP's array_merge()
and array_merge_recursive(). The difference to the two is that if an
array key contains another array then the function behaves recursive
(unlike array_merge()) but does not do if for keys containing strings
(unlike array_merge_recursive()). Please note: This function will work
with an unlimited amount of arguments and typecasts non-array parameters
into arrays. |
|
normalize ( string | array $list, boolean $assoc = true, string $sep = ',', boolean $trim = true ) : array |
Normalizes a string or array list. |
|
remove ( mixed $list, mixed $path = null ) : array |
Removes an element from an array as defined by $path. |
|
slice ( array $data, array | string $keys ) : array |
Slices an array into two, separating them determined by an array of keys. |
|
sort ( array $data, string $path, string $dir = 'asc' ) : array |
Sorts an array by any value, determined by a Set-compatible path. |
|