1 | <?php |
||
8 | class ArrayFunctions |
||
9 | { |
||
10 | /** |
||
11 | * Merge two arrays together. |
||
12 | * |
||
13 | * If an integer key exists in both arrays, the value from the second array |
||
14 | * will be appended the the first array. If both values are arrays, they |
||
15 | * are merged together, else the value of the second array overwrites the |
||
16 | * one of the first array. |
||
17 | * |
||
18 | * @see http://packages.zendframework.com/docs/latest/manual/en/index.html#zend-stdlib |
||
19 | * @param array $a |
||
20 | * @param array $b |
||
21 | * @return array |
||
22 | */ |
||
23 | public static function mergeArrays(array $a, array $b) |
||
41 | |||
42 | /** |
||
43 | * @param string[] $columns |
||
44 | * @param array $table |
||
45 | * @return array table with ordered columns |
||
46 | */ |
||
47 | public static function columnOrderArrayTable(array $columns, array $table) |
||
53 | |||
54 | /** |
||
55 | * order array entries (named and numbered) of array by the columns given as string keys. |
||
56 | * |
||
57 | * non-existent columns default to numbered entries or if no numbered entries exists any longer, to null. |
||
58 | * |
||
59 | * entries in array that could not consume any column are put after the columns. |
||
60 | * |
||
61 | * @param string[] $columns |
||
62 | * @param array $array |
||
63 | * @return array |
||
64 | */ |
||
65 | public static function columnOrder(array $columns, array $array) |
||
97 | } |
||
98 |