Methods summary
final public
|
#
__construct( )
Static class - cannot be instantiated.
Static class - cannot be instantiated.
|
public static
mixed
|
#
get( array $arr, string|integer|array $key, mixed $default = NULL )
Returns item from array or $default if item is not set.
Returns item from array or $default if item is not set.
Parameters
- $arr
- $key
- or more keys
- $default
Returns
mixed mixed
Throws
|
public static
mixed
&
|
#
getRef( array & $arr, string|integer|array $key )
Returns reference to array item.
Returns reference to array item.
Parameters
Returns
mixed mixed
Throws
|
public static
array
|
#
mergeTree( $arr1, $arr2 )
Recursively appends elements of remaining keys from the second array to the
first.
Recursively appends elements of remaining keys from the second array to the
first.
Returns
array array
|
public static
integer|false
|
#
searchKey( $arr, $key )
Searches the array for a given key and returns the offset if successful.
Searches the array for a given key and returns the offset if successful.
Returns
integer|false offset if it is found, FALSE otherwise
|
public static
|
#
insertBefore( array & $arr, $key, array $inserted )
Inserts new array before item specified by key.
Inserts new array before item specified by key.
|
public static
|
#
insertAfter( array & $arr, $key, array $inserted )
Inserts new array after item specified by key.
Inserts new array after item specified by key.
|
public static
|
|
public static
array
|
#
grep( array $arr, $pattern, $flags = 0 )
Returns array entries that match the pattern.
Returns array entries that match the pattern.
Returns
array array
|
public static
array
|
#
flatten( array $arr, $preserveKeys = FALSE )
Returns flattened array.
Returns
array array
|
public static
boolean
|
#
isList( $value )
Finds whether a variable is a zero-based integer indexed array.
Finds whether a variable is a zero-based integer indexed array.
Returns
boolean bool
|
public static
array|stdClass
|
#
associate( array $arr, $path )
Reformats table to associative tree. Path looks like
'field|field[]field->field=field'.
Reformats table to associative tree. Path looks like
'field|field[]field->field=field'.
Returns
|
public static
array
|
#
normalize( array $arr, $filling = NULL )
Normalizes to associative array.
Normalizes to associative array.
Returns
array array
|
public static
mixed
|
#
pick( array & $arr, string|integer $key, mixed $default = NULL )
Picks element from the array by key and return its value.
Picks element from the array by key and return its value.
Parameters
Returns
mixed mixed
Throws
|