1 | <?php |
||
5 | class Config |
||
6 | { |
||
7 | |||
8 | private $config; |
||
9 | private $context = 'default'; |
||
10 | |||
11 | /** |
||
12 | * Reads the configurations stored at a given path. |
||
13 | * |
||
14 | * Path could either point to a directory or a specific file. In the case of |
||
15 | * a file, the contents of the file are read into the config object. However, |
||
16 | * in the case of a directory, the contents of all the files in the directory |
||
17 | * are read into the config file with configurations from each file prefixed with |
||
18 | * the file name. |
||
19 | * |
||
20 | * @param string $path |
||
21 | * @return void |
||
22 | */ |
||
23 | 4 | public function readPath($path) { |
|
38 | |||
39 | public function isKeySet($key) { |
||
42 | |||
43 | 6 | public function get($key, $default = null) { |
|
46 | |||
47 | 1 | public function setContext($context) { |
|
50 | |||
51 | 3 | public function set($key, $value) { |
|
59 | |||
60 | 3 | private function setValue($keys, $value, $config) { |
|
69 | |||
70 | 5 | private function expand($array, $prefix = null) { |
|
84 | |||
85 | } |
||
86 |