| 1 | <?php |
||
| 8 | class ArrayUtility extends AbstractUtility |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @param array $toFilter |
||
| 12 | * @param array $keepKeys Includes the keys that need to be kept in $toFilter array |
||
| 13 | * |
||
| 14 | * @return array |
||
| 15 | */ |
||
| 16 | 25 | public function filterArray(array $toFilter, array $keepKeys) |
|
| 20 | |||
| 21 | /** |
||
| 22 | * Check if key is present in $search array and has got a value |
||
| 23 | * It considers values such as 0, '0', true and false AS true |
||
| 24 | * |
||
| 25 | * @param $key |
||
| 26 | * @param array $search |
||
| 27 | * |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | 27 | public function arrayKeyValueExists($key, array $search) |
|
| 50 | } |
||
| 51 |