1 | <?php |
||
7 | class ArrayUtil |
||
8 | { |
||
9 | /** |
||
10 | * Merges arrays recursively while preserving. |
||
11 | * |
||
12 | * @param array $array1 |
||
13 | * @param array $array2 |
||
14 | * |
||
15 | * @return array |
||
16 | * |
||
17 | * @see http://php.net/manual/en/function.array-merge-recursive.php#92195 |
||
18 | * @see https://github.com/grasmash/bolt/blob/robo-rebase/src/Robo/Common/ArrayManipulator.php#L22 |
||
19 | */ |
||
20 | public static function mergeRecursiveDistinct( |
||
30 | |||
31 | /** |
||
32 | * Process the value in an mergeRecursiveDistinct - make a recursive |
||
33 | * call if needed. |
||
34 | */ |
||
35 | protected static function mergeRecursiveValue(&$merged, $key, $value) |
||
42 | |||
43 | /** |
||
44 | * Fills all of the leaf-node values of a nested array with the |
||
45 | * provided replacement value. |
||
46 | */ |
||
47 | public static function fillRecursive(array $data, $fill) |
||
58 | |||
59 | /** |
||
60 | * Return true if the provided parameter is an array, and at least |
||
61 | * one key is non-numeric. |
||
62 | */ |
||
63 | public static function isAssociative($testArray) |
||
75 | } |
||
76 |