| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public static function get($key, $default = '') { |
||
| 16 | $keys = explode('.', $key); |
||
| 17 | $config = static::getAll(); |
||
| 18 | foreach ($keys as $key) { |
||
|
|
|||
| 19 | if (is_array($config) && array_key_exists($key, $config)) { |
||
| 20 | $config = $config[$key]; |
||
| 21 | } else { |
||
| 22 | return $default; |
||
| 23 | } |
||
| 24 | } |
||
| 25 | return $config; |
||
| 26 | } |
||
| 29 |