示例#1
0
 /**
  * @param string $host
  *
  * @return Host
  * @throws HostNotFoundException
  */
 public function resolve($host)
 {
     $hostFile = $this->hostsConfigDir . '/' . $host . '.yml';
     try {
         return new Host(Config::load($hostFile));
     } catch (FileNotFoundException $e) {
         throw new HostNotFoundException(sprintf('Host configuration file not found : %s', $hostFile));
     }
 }
示例#2
0
文件: Kernel.php 项目: hopus/common
 protected function parseConfig()
 {
     $config = Config::load($this->configFile);
     $this->container->share('config', $config);
 }