1 | <?php |
||
5 | class Config |
||
6 | { |
||
7 | private $config; |
||
8 | |||
9 | public $configFile; |
||
10 | |||
11 | public $dataDir; |
||
12 | |||
13 | 93 | public function __construct(array $config = []) |
|
17 | |||
18 | /** |
||
19 | * Build a config array. Merge user defined config with our default config. |
||
20 | * |
||
21 | * @param array $config User defined config |
||
22 | * @return array New configuration array |
||
23 | */ |
||
24 | 93 | private function buildConfig(array $config = []) |
|
41 | |||
42 | /** |
||
43 | * Get the config variable. |
||
44 | * |
||
45 | * @param string $val Variable name |
||
46 | * @return array|string Variable value |
||
47 | */ |
||
48 | 123 | public function get($val) |
|
59 | |||
60 | /** |
||
61 | * Return all configurations. |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | 3 | public function all() |
|
69 | |||
70 | 3 | public function addTranslation($id) |
|
81 | } |
||
82 |