| 1 | <?php |
||
| 5 | class Util |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * 对数组进行赋值/取值操作 |
||
| 9 | * |
||
| 10 | * @param array $arr |
||
| 11 | * @param mixed $key |
||
| 12 | * @param mixed $value |
||
| 13 | * @param mixed $getDefault |
||
| 14 | * @param \Closure|null $setAction |
||
| 15 | * @param bool $override |
||
| 16 | * @param bool $isSet |
||
| 17 | * |
||
| 18 | * @return mixed |
||
| 19 | */ |
||
| 20 | public static function operateArray(array &$arr, $key, $value = null, $getDefault = null, \Closure $setAction = null, $override = false, $isSet = false) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Pull the value from the specified array by key. |
||
| 52 | * |
||
| 53 | * @param array $options |
||
| 54 | * @param int|string $key |
||
| 55 | * |
||
| 56 | * @return mixed |
||
| 57 | */ |
||
| 58 | public static function pullFromArrayByKey(array &$options, $key) |
||
| 68 | } |
||
| 69 |