Example #1
0
 /**
  * Getting the value from the config file
  * 
  * @param string $service The section name that we are trying to load
  * @param string $name    The item name that we are trying to load
  * 
  * @return Mixed
  * @throws Exception
  */
 public static function get($service, $name)
 {
     if (self::$_values === null) {
         self::$_values = (require_once trim(self::$_conf_file) === '' ? self::_getConfDir('') : trim(self::$_conf_file));
     }
     if (isset(self::$_values[$service]) && isset(self::$_values[$service][$name])) {
         return self::$_values[$service][$name];
     }
     throw new Exception("Service({$service})/Name({$name}) not defined in config.");
 }