@@ 36-45 (lines=10) @@ | ||
33 | */ |
|
34 | public static function get($key){ |
|
35 | ||
36 | if (!self::$config) { |
|
37 | ||
38 | $config_file = APP . 'config/config.php'; |
|
39 | ||
40 | if (!file_exists($config_file)) { |
|
41 | throw new Exception("Configuration file doesn't exist"); |
|
42 | } |
|
43 | ||
44 | self::$config = require $config_file . ""; |
|
45 | } |
|
46 | ||
47 | return isset(self::$config[$key])? self::$config[$key]: null; |
|
48 | } |
|
@@ 59-68 (lines=10) @@ | ||
56 | */ |
|
57 | private static function loadJsConfig(){ |
|
58 | ||
59 | if (!self::$jsConfig) { |
|
60 | ||
61 | $config_file = APP . 'config/javascript.php'; |
|
62 | ||
63 | if (!file_exists($config_file)) { |
|
64 | throw new Exception("JavaScript Configuration file doesn't exist"); |
|
65 | } |
|
66 | ||
67 | self::$jsConfig = require $config_file . ""; |
|
68 | } |
|
69 | } |
|
70 | ||
71 | /** |