Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
70 | public function getValue($path) |
||
71 | { |
||
72 | $arrPath = explode('.', $path); |
||
73 | $data = $this->config; |
||
74 | foreach ($arrPath as $segment) { |
||
75 | if (!isset($data[$segment])) { |
||
76 | throw new Exception('invalid config path'); |
||
77 | } |
||
78 | $data = $data[$segment]; |
||
79 | } |
||
80 | return (string) $data; |
||
81 | } |
||
82 | } |
||
83 |