1 | <?php namespace Arcanedev\Settings\Utilities; |
||
11 | class Arr extends BaseArr |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Main Functions |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * Get an item from an array using "dot" notation. |
||
19 | * |
||
20 | * @param array $array |
||
21 | * @param array|string $key |
||
22 | * @param mixed $default |
||
23 | * |
||
24 | * @return mixed |
||
25 | */ |
||
26 | 33 | public static function get($array, $key, $default = null) |
|
32 | |||
33 | /** |
||
34 | * Get array by keys. |
||
35 | * |
||
36 | * @param array $input |
||
37 | * @param array $keys |
||
38 | * @param mixed $default |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | 12 | protected static function getArray(array $input, array $keys, $default = null) |
|
52 | |||
53 | /** |
||
54 | * Set an array item to a given value using "dot" notation. |
||
55 | * |
||
56 | * If no key is given to the method, the entire array will be replaced. |
||
57 | * |
||
58 | * @param array $array |
||
59 | * @param string $key |
||
60 | * @param mixed $value |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | 33 | public static function set(&$array, $key, $value) |
|
91 | } |
||
92 |