1 | <?php |
||
15 | class Config |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * Holds the configuration data |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $_config = []; |
||
23 | |||
24 | /** |
||
25 | * Set configuration value by key |
||
26 | * |
||
27 | * @param mixed $key |
||
28 | * @param mixed $value |
||
29 | * @param boolean $force |
||
30 | * @return boolean |
||
31 | * @throws ConfigInvalidException |
||
32 | */ |
||
33 | public function set($key, $value = null, $force = false) |
||
49 | |||
50 | /** |
||
51 | * Get configuration value by key |
||
52 | * |
||
53 | * @param string $key |
||
54 | * @return mixed |
||
55 | * @throws ConfigInvalidException |
||
56 | */ |
||
57 | public function get($key) |
||
69 | |||
70 | /** |
||
71 | * @param $key |
||
72 | * @return bool |
||
73 | */ |
||
74 | public function delete($key) |
||
81 | |||
82 | /** |
||
83 | * Iterate through configuration till given key is found |
||
84 | * |
||
85 | * @param $key |
||
86 | * @return array|mixed |
||
87 | * @throws ConfigInvalidException |
||
88 | */ |
||
89 | private function recursive($key) |
||
105 | |||
106 | } |