/**
  * 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();
 }
 /**
  * Execute the command.
  *
  * @param  \Symfony\Component\Console\Input\InputInterface  $input
  * @param  \Symfony\Component\Console\Output\OutputInterface  $output
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $configFilePath = null;
     if ($input->getOption('config')) {
         $configFilePath = realpath($input->getOption('config'));
     }
     // Prepare.
     $config = ConfigFactory::createFromConfigFile($configFilePath);
     $env = new Environment($config, $input, $output);
     $handler = new RegisterServerService($config, $env, $input, $output);
     $handler->handle();
 }
 /**
  * Execute the command.
  *
  * @param  \Symfony\Component\Console\Input\InputInterface  $input
  * @param  \Symfony\Component\Console\Output\OutputInterface  $output
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $configFilePath = null;
     if ($input->getArgument('name')) {
         $configFilePath = SeleniumSetup::$APP_CONF_PATH . DIRECTORY_SEPARATOR . $input->getArgument('name') . '.json';
     }
     if ($input->getOption('config')) {
         $configFilePath = realpath($input->getOption('config'));
     }
     // Prepare.
     $config = ConfigFactory::createFromConfigFile($configFilePath);
     $env = new Environment($config, $input, $output);
     $handler = new StartServerService($config, $env, $input, $output);
     if ($handler->test()) {
         if (!$env->isAdmin()) {
             $output->writeln('<comment>Running without elevated rights.</comment>');
         }
         $output->writeln('<comment>Let\'s go ...</comment>');
         $handler->handle();
     } else {
         $output->writeln('<error>Missing required components. Please review your setup.</error>');
     }
 }