Exemplo n.º 1
0
 /**
  * Execute the command.
  * @todo Decide if this can be isolated into a service. 
  *
  * @param  \Symfony\Component\Console\Input\InputInterface  $input
  * @param  \Symfony\Component\Console\Output\OutputInterface  $output
  * @return void
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     // Prepare.
     $locker = new Locker();
     $locker->openLockFile();
     // View.
     $table = $this->getHelper('table');
     $table->setHeaders(ServerItem::getAllProperties())->setRows($locker->toArray());
     $table->render($output);
 }
Exemplo n.º 2
0
 /**
  * Execute the command.
  *
  * @param  \Symfony\Component\Console\Input\InputInterface  $input
  * @param  \Symfony\Component\Console\Output\OutputInterface  $output
  * @return void
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     $locker = new Locker();
     $locker->openLockFile();
     $serverItem = $locker->getServer($input->getArgument('name'));
     // Prepare.
     $config = ConfigFactory::createFromConfigFile($serverItem->getConfigFilePath());
     $env = new Environment($config, $input, $output);
     $handler = new StopServerService($config, $env, $input, $output);
     $handler->handle();
 }