예제 #1
0
 /**
  * Since this is a singleton class, use this method to create a new config instance.
  * @uses Config::setConfig() Configuration must be set prior to calling this method. To generate a completely new object, set a new config
  * @codeCoverageIgnore
  * @static
  * @throws \Tripod\Exceptions\ConfigException
  * @internal param string $specName
  * @return Config
  */
 public static function getInstance()
 {
     if (!isset(self::$config)) {
         throw new \Tripod\Exceptions\ConfigException("Call Config::setConfig() first");
     }
     if (!isset(self::$instance)) {
         self::$instance = new Config();
         self::$instance->loadConfig(self::$config);
     }
     return self::$instance;
 }
예제 #2
0
 /**
  * @param array $config
  */
 public function loadConfig(array $config)
 {
     parent::loadConfig($config);
 }