final public
|
#
__construct(
)
Static class – cannot be instantiated. Static class – cannot be instantiated. |
public static
mixed
|
#
get(
array
$arr,
mixed
$key,
mixed
$default = NULL
)
Returns array item or $default if item is not set. Returns array item or $default if item is not set. Example: $val = ArrayTools::get($arr, ‚i‘, 123); Parameters$arr mixed array$key mixed key$default mixed default value |
public static
mixed
&
|
#
getRef(
mixed
& $arr,
mixed
$key
)
Returns reference to array item or $default if item is not set. Returns reference to array item or $default if item is not set. Parameters$arr mixed array$key mixed key |
public static
array
|
#
mergeTree(
array
$arr1,
array
$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. Parameters$arr1 array$arr2 array |
public static
int
|
#
searchKey(
array
$arr,
mixed
$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. Parameters$arr array input array$key mixed keyReturnsint offset if it is found, FALSE otherwise
|
public static
void
|
#
insertBefore(
array
& $arr,
mixed
$key,
array
$inserted
)
Inserts new array before item specified by key. Inserts new array before item specified by key. Parameters$arr array input array$key mixed key$inserted array inserted array |
public static
void
|
#
insertAfter(
array
& $arr,
mixed
$key,
array
$inserted
)
Inserts new array after item specified by key. Inserts new array after item specified by key. Parameters$arr array input array$key mixed key$inserted array inserted array |
public static
void
|
#
renameKey(
array
& $arr,
mixed
$oldKey,
mixed
$newKey
)
Renames key in array. Renames key in array. Parameters$arr array$oldKey mixed old key$newKey mixed new key |
public static
array
|
#
grep(
array
$arr,
string
$pattern,
int
$flags = 0
)
Return array entries that match the pattern. Return array entries that match the pattern. Parameters$arr array$pattern string$flags int |