Config.php (435B)
1 <?php 2 3 class Config 4 { 5 // this is public to allow better Unit Testing 6 public static $config; 7 8 public static function get($key) 9 { 10 if (!self::$config) { 11 12 $config_file = 'libs/login-base/application/config/config.' . Environment::get() . '.php'; 13 14 if (!file_exists($config_file)) { 15 return false; 16 } 17 18 self::$config = require $config_file; 19 } 20 return self::$config[$key]; 21 } 22 }