Execute the console command.

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

@return mixed
765935
protected function execute(InputInterface $input, OutputInterface $output)
    {
        // set env through argument --env
        if ($input->hasOption('env')) {
            $env = $input->getOption('env');
            putenv("APP_ENV=$env");
        }

        // call method defined in Command.
        return call_user_func_array([$this, 'handle'], []);
    }
922936
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $inputFile = $input->getArgument('input-file');
        $outputFile = $input->getArgument('output-file');

        if ($outputFile === null) {
            $outputFile = preg_replace('/\\.[^.]*$/', '.php', $inputFile);
        }

        $parserGenerator = new ParserGenerator(new PegFile());

        $output = "<?php\n\n" . $parserGenerator->createClass($inputFile);

        file_put_contents($outputFile, $output);
    }
153146
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $method = method_exists($this, 'process') ? 'process' : 'handle';

        return $this->{$method}();
    }
85354
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);
        $this->relation = $input->getArgument('relation');
    }
174434
protected function execute(InputInterface $input, Output\OutputInterface $output)
    {
        foreach ($this->getDefinition()->getArguments() as $arg) {
            if ($arg->getName() === 'command') {
                continue;
            }
            if ($input->getArgument($arg->getName())) {
                $this->getContainer()->set(explode('.', $this->nameToVar($arg->getName())), $input->getArgument($arg->getName()));
            }
        }

        foreach ($this->opts as $opt) {
            if ($value = $input->getOption($this->varToName($opt))) {
                $this->getContainer()->set(explode('.', $opt), $value);
            }
        }

        foreach ($this->flags as $name => $value) {
            $varName = explode('.', $name);
            $optName = $this->varToName($name);
            $this->getContainer()->set($varName, $value);

            if ($input->getOption('no-' . $optName) && $input->getOption($optName)) {
                throw new \InvalidArgumentException("Conflicting options --no-{$optName} and --{$optName} supplied. That confuses me.");
            }
            if ($input->getOption('no-' . $optName)) {
                $this->getContainer()->set($varName, false);
            } elseif ($input->getOption($optName)) {
                $this->getContainer()->set($varName, true);
            }
        }

        $callable = $this->getContainer()->get($this->getTaskReference());
        call_user_func($callable, $this->getContainer());
    }
105744
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->Selftest($input, $output);
        $this->Ping($input, $output);
        $this->Connect($input, $output);
    }
874976
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);
        $countries = $this->getCountriesFromInput($input);

        foreach ($countries as $countryCode) {
            $countryCode = strtoupper($countryCode);
            $this
                ->deleteCountry(
                    $input,
                    $output,
                    $countryCode
                );
        }

        $this->finishCommand($output);
    }
186021
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $dir = $input->getArgument('dir');

        Console::setCustomEnvDirectory($dir);

        $output->writeln('### ENV directory has been set to '.$dir.' ###');
    }
1133146
public function run(InputInterface $input, OutputInterface $output)
    {
        return parent::run(
            $this->input = $input, $this->output = new OutputStyle($input, $output)
        );
    }
761302
public function execute(InputInterface $input, OutputInterface $output)
    {
        $runner = $this->commandDefinition->getRunner();
        $runner();
    }
51852
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $this->createOutput($input, $output);

        $this->getFacade()->runInstall(
            $this->getCommandLineArgumentContainer(),
            $this->getCommandLineOptionContainer(),
            $this->output
        );

        return 0;
    }
496129
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $created = $this->scaffold(
            'ajax',
            [
                'CLASSNAME' => $input->getArgument('name'),
            ],
            [
                'ACTION' => $input->getOption('action'),
            ]
        );

        if ($created === true) {
            $output->writeln("<info>{$input->getArgument('name')} was created successfully</info>");
        } else {
            $output->writeln("<error>{$input->getArgument('name')} could not be created</error>");
        }
    }
69039
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        /** @var $repository Repository */
        $repository = $this->getContainer()->get('ezpublish.api.repository');

        /** @var $contentTypeService ContentTypeService */
        $contentTypeService = $repository->getContentTypeService();
        /** @var $contentLanguageService LanguageService */
        $contentLanguageService = $repository->getContentLanguageService();

        /** @var $questionHelper QuestionHelper */
        $questionHelper = $this->getHelper('question');

        $struct = array();

        $struct['contentTypeGroup'] = $this->getContentTypeGroup($contentTypeService, $questionHelper);
        $struct['contentTypeIdentifier'] = $this->getContentTypeIdentifier($questionHelper);
        $struct['contentTypeName'] = $this->getContentTypeName($questionHelper);
        $struct['contentTypeMainLanguage'] = $this->getContentTypeMainLanguage($contentLanguageService, $questionHelper);
        $struct['contentTypeNameSchema'] = $this->getContentTypeNameSchema($questionHelper);
        $struct['fields'] = array();

        while (true) {
            $struct['fields'][] = $this->getContentTypeField($questionHelper, $struct['contentTypeMainLanguage']);
            $question = new ConfirmationQuestion(
                '<question>Do you want to add new field?</question> ',
                false
            );

            if (!$questionHelper->ask($input, $output, $question)) {
                $output->writeln('');
                break;
            }
        }

        /** @var $configResolver ConfigResolver */
        $configResolver = $this->getContainer()->get('ezpublish.config.resolver');
        $adminID = $configResolver->getParameter('adminid', 'smile_ez_tools');

        $contentTypeService = new ContentType($repository);
        $contentTypeService->setAdminID($adminID);
        try {
            $contentTypeService->add($struct);
            $output->writeln("<info>Content type created</info>");
        } catch (UnauthorizedException $e) {
            $output->writeln("<error>" . $e->getMessage() . "</error>");
        } catch (ForbiddenException $e ) {
            $output->writeln("<error>" . $e->getMessage() . "</error>");
        }
    }
594086
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        try {
            return $this->fire();
        } catch (DomainException $e) {
            return 1;
        } catch (Exception $e) {
            $this->error($e->getMessage());
            $this->error('Abort!');
        }

        return;
    }
24071
protected function execute(InputInterface $input, OutputInterface $output) : void
    {
        $io     = $this->getIO($input, $output);
        $config = $this->getConfig($input->getOption('configuration'));

        $configurator = new Creator($io, $config);
        $configurator->force($input->getOption('force'))
                     ->extend($input->getOption('extend'))
                     ->advanced($input->getOption('advanced'))
                     ->run();
    }
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);
    }
1164678
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $this->version = $this->getApplication()->getVersion();

        /**
         * Check for ancilliary options
         */
        if ($input->getOption('rollback')) {
            $this->rollback();

            return;
        }

        if ($input->getOption('check')) {
            $this->printAvailableUpdates();

            return;
        }

        $this->updateToDevelopmentBuild();
    }