1 | <?php |
||
8 | class Config implements ArrayAccess, \JsonSerializable |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | protected $config; |
||
14 | |||
15 | /** |
||
16 | * @param array $config |
||
17 | */ |
||
18 | public function __construct(array $config) |
||
22 | |||
23 | /** |
||
24 | * @param string $key |
||
25 | * @param mixed $default |
||
26 | * |
||
27 | * @return mixed |
||
28 | */ |
||
29 | public function get(string $key, $default = null) |
||
50 | |||
51 | /** |
||
52 | * @param string $key |
||
53 | * @param mixed $value |
||
54 | * |
||
55 | * @return array |
||
56 | */ |
||
57 | public function set(string $key, $value) |
||
78 | |||
79 | /** |
||
80 | * @param string $key |
||
81 | * |
||
82 | * @return bool |
||
83 | */ |
||
84 | public function has(string $key): bool |
||
88 | |||
89 | public function offsetExists($offset) |
||
93 | |||
94 | public function offsetGet($offset) |
||
98 | |||
99 | public function offsetSet($offset, $value) |
||
103 | |||
104 | public function offsetUnset($offset) |
||
108 | |||
109 | public function jsonSerialize() |
||
113 | |||
114 | public function __toString() |
||
118 | } |
||
119 |