Conditions | 6 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
23 | public static function get($key, $directory = null) |
||
24 | { |
||
25 | $fileName = $directory . "config/"; |
||
26 | $exp = explode(".", $key); |
||
27 | if (is_array($exp) && $exp[0] != null && $exp[1] != null && file_exists($fileName . $exp[0] . ".php")) { |
||
28 | $conf = include($fileName . $exp[0] . ".php"); |
||
29 | $val = array_key_exists($exp[1], $conf) ? $conf[$exp[1]] : null; |
||
30 | return $val; |
||
31 | } |
||
32 | return null; |
||
33 | } |
||
34 | |||
35 | } |