Пример #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
 protected function parseConfig()
 {
     $config = Config::load($this->configFile);
     $this->container->share('config', $config);
 }