/** * 将配置文件中的autoLoad项目注册到load空间 */ protected function initAutoLoad() { $loads = $this->appConfig->getByKey('autoLoad'); $loader = Front::getInstance()->getLoader(); foreach ($loads as $name => $path) { $loader->addSpace($name, $path); } return true; }
public function getSiteConfig() { if ($this->siteConfig === NULL) { if ($this->appConfig === NULL) { throw new Exception('appConfig instance has not been initialized.'); } $siteIni = $this->appConfig->getByKey('app.global'); $this->siteConfig = new \HuiLib\Config\ConfigBase($siteIni); } return $this->siteConfig; }