/**
  * @param IO $io
  */
 protected function parseConfig(IO $io)
 {
     $configFile = __DIR__ . '/../../../etc/config.yml';
     if (file_exists($configFile) && is_file($configFile)) {
         $config = Yaml::parse(file_get_contents($configFile));
         try {
             $this->profile = Profile::fromArray($config);
         } catch (\InvalidArgumentException $e) {
             $io->errorLine("Invalid config.yml file");
             exit;
         }
     } else {
         $io->errorLine("No config.yml file");
         exit;
     }
 }
Ejemplo n.º 2
0
 /**
  * @param Profile $profile
  */
 public function __construct(Profile $profile)
 {
     $this->host = $profile->getHost();
     $this->user = $profile->getUser();
     $this->password = $profile->getPassword();
 }
Ejemplo n.º 3
0
 /**
  * @param Profile $profile
  */
 function __construct(Profile $profile)
 {
     $this->url = "http://" . $profile->getHost() . "/web/";
 }