Execute the console command.

@param \Symfony\Component\Console\Input\InputInterface   $input
@param \Symfony\Component\Console\Output\OutputInterface $output

@return mixed
433549
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = new RocketeerStyle($input, $output);

        return $this->container->call([$this, 'fire']);
    }
1062771
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $cmd        = $input->getArgument('cmd');
        $process    = $input->getArgument('server');

        $server = new Server(
            Config::get('name'),
            $process
        );

        $server->$cmd();
    }
1215728
public function execute(InputInterface $input, OutputInterface $output)
    {
        $host = $input->getArgument('host');

        $valid = $this->hostFile->check($host);

        $msg = $valid ? 'Host was found in the host file.' : 'Host was not found in the host file.';

        $output->writeln($msg);

        if ($valid) {
            $output->writeLn($valid);
        }
    }
399638
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if ($this->validator()->fails()) {
            $this->error($this->formatErrors());
            // Exit with status code 1
            return 1;
        }

        return parent::execute($input, $output);
    }
976113
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->bootstrap($input, $output);

        $environment = $input->getOption('environment');
        $format = $input->getOption('format');

        if ($environment === null) {
            $environment = $this->getConfig()->getDefaultEnvironment();
            $output->writeln('<comment>warning</comment> no environment specified, defaulting to: ' . $environment);
        } else {
            $output->writeln('<info>using environment</info> ' . $environment);
        }
        if ($format !== null) {
            $output->writeln('<info>using format</info> ' . $format);
        }

        $output->writeln('<info>ordering by </info>' . $this->getConfig()->getVersionOrder() . " time");

        // print the status
        return $this->getManager()->printStatus($environment, $format);
    }
608343
public function execute(InputInterface $input, OutputInterface $output)
    {
        if (empty($path = $input->getArgument('path'))) {
            $this->render($input, $output);
        } else {
            $this->test($input->getArgument('method'), $path, $input, $output);
        }

        return 0;
    }
1281580
public function run(InputInterface $input = null, OutputInterface $output = null)
    {
        if ($input !== null) {
            $in = $input;
        } else {
            $in = $this->getInput();
        }

        return parent::run($in, $output);
    }
1275154
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input  = $input;
        $this->output = $output;
        $logger       = $this->logger;

        Resque_Event::listen(
            'onFailure',
            function ($exception, $job) use ($logger) {
                $logger->error('Error processing job', [
                    'exception' => $exception
                ]);
            }
        );

        if ($input->getOption('shutdown')) {
            $this->shutdownWorkers();
            return;
        }

        $queues = $input->getArgument('queue');
        if (! count($queues)) {
            throw new RuntimeException('Not enough arguments.');
        }

        $count    = $input->getOption('count');
        $interval = $input->getOption('interval');

        if ($output->getVerbosity() === OutputInterface::VERBOSITY_VERBOSE) {
            $logLevel = Resque_Worker::LOG_NORMAL;
        } elseif ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE) {
            $logLevel = Resque_Worker::LOG_VERBOSE;
        } else {
            $logLevel = Resque_Worker::LOG_NONE;
        }

        $this->startWorkers($queues, $count, $logLevel, $interval);
    }
665599
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $userService = new UserService($this->userStore);

        /** @var $dialog \Symfony\Component\Console\Helper\DialogHelper */
        $dialog = $this->getHelperSet()->get('dialog');

        // Function to validate mail address.
        $mailValidator = function ($answer) {
            if (!filter_var($answer, FILTER_VALIDATE_EMAIL)) {
                throw new \InvalidArgumentException(Lang::get('must_be_valid_email'));
            }

            return $answer;
        };

        $adminEmail = $dialog->askAndValidate($output, Lang::get('enter_email'), $mailValidator, false);
        $adminName = $dialog->ask($output, Lang::get('enter_name'));
        $adminPass = $dialog->askHiddenResponse($output, Lang::get('enter_password'));

        try {
            $userService->createUser($adminName, $adminEmail, $adminPass, true);
            $output->writeln(Lang::get('user_created'));
        } catch (\Exception $e) {
            $output->writeln(sprintf('<error>%s</error>', Lang::get('failed_to_create')));
            $output->writeln(sprintf('<error>%s</error>', $e->getMessage()));
        }
    }
557886
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        if (null === ($backupDir = $input->getArgument('backup-dir'))) {
            $backupDir = $this->doAskBackupDir();
        }

        if (null === ($machine = $input->getOption('machine'))) {
            $machine = $this->doAskMachineName();
        }

        if (null === ($installDir = $input->getOption('install-dir'))) {
            $installDir = $this->doAskInstallDir();
        }

        $this->initDotfilesProfile($backupDir, $machine, $installDir);
    }
323992
protected function execute(InputInterface $input, OutputInterface $output)
	{
		$this->setupEnvironment('site', $input, $output);

		$version = new \JVersion;

		if ($input->getOption('short'))
		{
			$result = $version->getShortVersion();
		}
		elseif ($input->getOption('release'))
		{
			$result = $version->RELEASE;
		}
		else
		{
			$result = $version->getLongVersion();
		}
		$output->writeln($result);
	}
1335069
public function execute(InputInterface $input, OutputInterface $output)
    {
        $fixCommand = new FixCommand();
        $formatCommand = new FormatCommand();

        $fixInput = [];
        $formatInput = [];

        if ($input->getOption('dry-run')) {
            $fixInput['--dry-run'] = true;
            $formatInput['--dry-run'] = true;
        }

        if ($input->getOption('diff')) {
            $fixInput['--diff'] = true;
        }

        $output->writeln('<info>Running style:fix...</info>');
        $fixCommand->run(new ArrayInput($fixInput), $output);

        $output->writeln('<info>Running style:format...</info>');
        $formatCommand->run(new ArrayInput($formatInput), $output);

        return 0;
    }
967208
public function doRun(InputInterface $input, OutputInterface $output)
	{
		$this->io = new ConsoleIO($input, $output, $this->getHelperSet());
		ErrorHandler::register($this->io);

		return parent::doRun($input, $output);
	}
268890
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->applicationConfig->validate();
        $this->injectOutputIntoLogger($output, $this->logger);
        $this->applicationDestroyer->setLogger($this->logger);
        $appName = $this->applicationConfig->getAppName();

        if (!$input->getOption('force')) {
            /** @var QuestionHelper $helper */
            $helper = $this->getHelper('question');
            $question = new ConfirmationQuestion(
                sprintf(
                    '<question>Are you sure you want to destroy deployment of application "%s"? [y/N]</question>',
                    $appName
                ),
                false
            );

            if (!$helper->ask($input, $output, $question)) {
                return 0;
            }
        }

        $this->logger->info("Destroying deployment of application \"$appName\".");
        $this->applicationDestroyer->destroy();
        $this->logger->info("Deployment of application \"$appName\" destroyed.");
        return 0;
    }
797085
protected function execute( InputInterface $input, OutputInterface $output )
	{
		$code = $input->getArgument( 'email' );
		if( ( $password = $input->getOption( 'password' ) ) === null )
		{
			$helper = $this->getHelper( 'question' );
			$question = new Question( 'Password' );
			$question->setHidden( true );

			$password = $helper->ask( $input, $output, $question );
		}

		$context = $this->getContainer()->get( 'aimeos.context' )->get( false, 'command' );
		$context->setEditor( 'aimeos:account' );

		$localeManager = \Aimeos\MShop::create( $context, 'locale' );
		$localeItem = $localeManager->bootstrap( $input->getArgument( 'site' ), '', '', false );
		$context->setLocale( $localeItem );

		$user = $this->createCustomerItem( $context, $code, $password );

		if( $input->getOption( 'admin' ) ) {
			$this->addGroup( $input, $output, $context, $user, 'admin' );
		}

		if( $input->getOption( 'editor' ) ) {
			$this->addGroup( $input, $output, $context, $user, 'editor' );
		}

		if( $this->getContainer()->has( 'fos_user.user_manager' ) )
		{
			$userManager = $this->getContainer()->get( 'fos_user.user_manager' );

			if( ( $fosUser = $userManager->findUserByUsername( $code ) ) === null ) {
				throw new \RuntimeException( 'No user created' );
			}

			$fosUser->setSuperAdmin( false );

			if( $input->getOption( 'super' ) ) {
				$fosUser->setSuperAdmin( true );
			}

			if( $input->getOption( 'admin' ) || $input->getOption( 'editor' ) ) {
				$fosUser->addRole( 'ROLE_ADMIN' );
			}

			$userManager->updateUser( $fosUser );
		}
	}
965828
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);

        $configurationIdentifier = $input->getArgument('identifier');
        $configurationValue = json_encode($this
            ->configurationManager
            ->get($configurationIdentifier));

        $this->printMessage(
            $output,
            'Configuration',
            $configurationIdentifier . ' : "' . $configurationValue . '"'
        );

        $this->finishCommand($output);
    }
869287
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);
        $plugins = $this
            ->pluginRepository
            ->findAll();

        /**
         * @var Plugin $plugin
         */
        foreach ($plugins as $plugin) {
            $this->printMessage(
                $output,
                'Plugin',
                $plugin->getNamespace() . ' - [Hash : ' . $plugin->getHash() . ']'
            );
        }

        $this->finishCommand($output);
    }