Class ArrayUtil
Standalone class with miscellaneous array functions
Author:
Demitri Morgan <demitri@x2engine.com>,
Derek Mueller <derek@x2engine.com>
Located at x2engine/protected/components/util/ArrayUtil.php
Located at x2engine/protected/components/util/ArrayUtil.php
public static
array
|
#
normalizeToArray( array $expectedFields, array $currentFields )
Given two associative arrays, returns an array with the same set of keys as the first, but with key/value pairs from the second if they are present. Any keys in the second and not in the first will be ignored/dropped. |
public static
array
|
#
normalizeToArrayR( array $expectedFields, array $currentFields, mixed $maintainOrder = true )
A recursive version of normalizeToArray () which optionally maintains order of current fields. |
public static
boolean
|
|
public static
type
|
#
arraySearchPreg( string $find, array $in_array, array $keys_found = array() )
Similar to array_search but recursive, doesn't return needle of there's only one match, and allows for regex searching. |
public static
|
|
public static
the
|
|
public static
the
|
|
public static
|
|
public static
|
|
public static
|
#
numericIndexOf( mixed $needle, mixed $haystack, mixed $strict = false )
Like array_search but returns numeric index instead of key |
public static
|
|
public static
|
|
public static
|