Total Complexity | 9 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class System extends Config |
||
10 | { |
||
11 | public function setValue(string $name, $value): Config |
||
12 | { |
||
13 | $this->values[$name] = $value; |
||
14 | |||
15 | return $this; |
||
16 | } |
||
17 | |||
18 | public function setValues(array $values): Config |
||
19 | { |
||
20 | $this->values = $values; |
||
21 | |||
22 | return $this; |
||
23 | } |
||
24 | |||
25 | public function mergeValues(array $values): Config |
||
26 | { |
||
27 | $this->values = array_merge($this->values, $values); |
||
28 | |||
29 | return $this; |
||
30 | } |
||
31 | |||
32 | public function load(array $paths = []): Config |
||
33 | { |
||
34 | $path = $this->getOutputPath(); |
||
35 | if (!file_exists($path)) { |
||
36 | return $this; |
||
37 | } |
||
38 | |||
39 | $this->values = array_merge($this->loadFile($path), $this->values); |
||
40 | |||
41 | return $this; |
||
42 | } |
||
43 | |||
44 | public function build(): Config |
||
49 | } |
||
50 | |||
51 | public function hasEnv(): bool |
||
52 | { |
||
53 | return true; |
||
54 | } |
||
55 | |||
56 | public function hasConstants(): bool |
||
57 | { |
||
58 | return true; |
||
59 | } |
||
60 | |||
61 | public function hasParams(): bool |
||
64 | } |
||
65 | } |
||
66 |