Beispiel #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     $name = $input->getArgument('name');
     $path = $input->getArgument('path');
     $cfg = $this->getSelimConfig($input);
     if (!$cfg->siteExists($name)) {
         $cfg->addSite($name, $path);
         $cfg->write();
         echo "added: '{$name}'" . PHP_EOL;
     } else {
         echo "Site with name '{$name}' already exists!" . PHP_EOL;
     }
 }