@param InputInterface $input An InputInterface instance
@param OutputInterface $output An OutputInterface instance

@return null|int null or 0 if everything went fine, or an error code

@throws LogicException When this abstract method is not implemented
769527
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $indexName = $this->getContainer()->getParameter('open_orchestra_elastica.index.name');;
        $index = $this->getContainer()->get('open_orchestra_elastica.client.elastica')->getIndex($indexName);
        try {
            $index->delete();
            $message = 'Drop Elastica Index';
            $output->writeln(sprintf('<comment>></comment> <info>%s</info>', $message));
        } catch (ResponseException $e) {
            $message = 'No Elastica Index to drop';
            $output->writeln(sprintf('<comment>></comment> <info>%s</info>', $message));
        }
    }
347975
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setInputAndOutput($input, $output);

        return $this->doExecute();
    }
145806
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->setOutput($output);
        //
        if ($this->database && config('components.database')) {
            Database::ini();
        } elseif ($this->database && !config('components.database')) {
            exception(LogicException::class, 'The database surface is disabled');
        }
        //
        $this->handle();
    }
482196
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->injectOutputIntoLogger($output, $this->logger);
        $adapter = $this->databaseImportExportAdapterManager->getAdapter($input->getOption('adapter'));
        $adapter->setLogger($this->logger);

        $database = $input->getArgument('database');
        $path = $input->getArgument('path');
        $ignoreTables = $input->getOption('ignore-tables') ? explode(',', $input->getOption('ignore-tables')) : [];

        $this->logger->info("Exporting database \"$database\".");
        $filename = $adapter->exportToFile(
            $database,
            $path,
            [
                'ignore_tables'   => $ignoreTables,
                'remove_definers' => !$input->getOption('no-remove-definers'),
            ]
        );
        $this->logger->info("Database \"$database\" exported to \"$filename\"!");
        return 0;
    }
1063373
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);
        $this->schema   = $input->getArgument('schema');

        if (!$this->schema) {
            $this->schema = 'public';
        }

        $this->prefix_dir = $input->getOption('prefix-dir');
        $this->prefix_ns  = $input->getOption('prefix-ns');
        $this->flexible_container = $input->getOption('flexible-container');
    }
1225427
protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        return !is_null($this->exitCode) ? $this->exitCode : 0;
    }
503861
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        try {
            $this->doExecute($input, $output);
        } catch (\Exception $e) {
            $this->writeException($e);
        }
    }
1090741
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);
        $info = $this
            ->getSession()
            ->getInspector()
            ->getSchemas()
            ;
        $this->formatOutput($output, $info);
    }
1177449
protected function execute(InputInterface $input, OutputInterface $output)
  {
    $this->_input = $input;
    $this->_output = $output;

    $params = array_values($input->getArguments());
    //Strip off the command name
    array_shift($params);

    //Call the execute command with $input and $output as the first args
    if(method_exists($this, 'executeCommand'))
    {
      array_unshift($params, $input, $output);
      return $this->executeCommand(...$params);
    }

    //Call the process method, without $input and $output
    if(method_exists($this, 'process'))
    {
      return $this->process(...$params);
    }

    throw new \RuntimeException(
      "Your command must contain one of the following methods:\n" .
      "process()\n" .
      'executeCommand(InputInterface $input, OutputInterface $output)' . "\n",
      500
    );
  }
1372950
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->configureOptions($input);

        $rows = $failed = array();
        foreach ($this->finder->findAll() as $release) {
            $this->locator->setParams(array('release' => $release));
            $scripts = $rollbacks = array();
            $status  = '<fg=green>OK</fg=green>';

            try {
                $scripts   = $this->locator->findScripts();
                $rollbacks = $this->locator->findRollbackScripts();
                $this->checker->check($scripts, $rollbacks);
            } catch (\Exception $e) {
                $status   = sprintf('<fg=red>%s</fg=red>', $e->getMessage());
                $failed[] = $release;
            }

            $rows[] = array($release, count($scripts), count($rollbacks), $status);
        }

        $this->display($output, $rows, $failed);
    }
122566
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $command = sprintf(
            'exec -i %s %s',
            $input->getArgument('container'),
            $input->getArgument('execcmd')
        );

        $response = $this->getFacade()->runDocker($command);

        if ($output->isVerbose()) {
            $output->writeln($response);
        }
    }
1040150
public function cli(InputInterface $input = null, OutputInterface $output = null)
  {
    $input = $input ?? new ArgvInput();
    $output = $output ?? new ConsoleOutput();

    $console = $this->getConsole();
    $this->_eventChannel->trigger(ConsolePrepareEvent::i($this->getContext(), $console, $input, $output));

    try
    {
      $exitCode = $console->run($input, $output);
    }
    catch(\Throwable $e)
    {
      $output->writeln("GENERIC EXCEPTION : " . $e->getCode());
      $output->writeln($e->getMessage());
      $exitCode = 1;
    }

    return $exitCode > 255 ? 255 : $exitCode;
  }
1201620
protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        $body = $input->getArgument('body');
        $json = json_decode($input->getArgument('body'), true);
        if (json_last_error() !== 0) {
            $body = $json;
        }

        $queue = self::queue($input->getOption('queue'));
        $queue->publish($body);

        return 0;
    }
1372739
protected function waitForUserInput(InputInterface $input, OutputInterface $output)
    {
        $helper   = $this->getHelper('question');
        $question = new Question('<info>You > </info>');

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

        $this->listenForConsoleCommands($input, $output, $message);

        $this->getBotResponse($input, $output, $message);
    }
862148
public function execute(InputInterface $input, OutputInterface $output)
    {
        if (($name = $input->getArgument('name'))) {
            if ('php' === pathinfo($name, PATHINFO_EXTENSION)) {
                $file = app()->getPath().'/config/'.$name;
                $config = load($file);
                $config = json_encode($config, JSON_PRETTY_PRINT);
            } else {
                $config = config()->get($name, null);
                if (null === $config) {
                    throw new \LogicException(sprintf('Config "%s" is not configure.', $name));
                }

                $config = [$name => $config];
                $config = json_encode($config, JSON_PRETTY_PRINT);
            }

            $output->write('<comment>'.$config.'</comment>');

            return 0;
        }
        $table = new Table($output);
        $rows = [];
        $table->setHeaders(array('File', 'Config', 'Owner', 'Modify At'));

        foreach (glob(app()->getPath().'/config/*') as $file) {
            $file = new FileObject($file);
            $config = load($file->getPathname());
            $count = 0;
            if (is_array($config)) {
                $count = count(array_keys($config));
            }
            $rows[] = [
                $file->getFilename(),
                $count.' Keys',
                posix_getpwuid($file->getOwner())['name'],
                date('Y-m-d H:i:s', $file->getMTime()),
            ];
        }

        $table->setRows($rows);
        $table->render();
    }
1170854
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $verbosity = PhpVersions::VERBOSITY_NORMAL;
        $verbosity = $input->getOption('verbose') == 2 ? PhpVersions::VERBOSITY_VERBOSE : $verbosity;
        $verbosity = $input->getOption('verbose') == 3 ? PhpVersions::VERBOSITY_DEBUG : $verbosity;
        $verbosity = $input->getOption('quiet') ? PhpVersions::VERBOSITY_SILENT : $verbosity;
        $phpVersions = new PhpVersions(null, $verbosity);

        $versions = $input->getArgument('php');
        $version = array_shift($versions);
        if (empty($version)) {
            $version = 'latest';
        }

        $info = $phpVersions->getInfo($version);

        $output->write($info['version']);
    }
419662
public function execute(InputInterface $input, OutputInterface $output)
    {
        $argument = $input->getArgument($this->argumentName);
        $path = $this->basePath.'/'.$argument.'.php';

        if ($input->hasOption('restful') && $input->getOption('restful') == true) {
            $this->restful = true;
        } else {
            $this->restful = false;
        }

        $response = $this->runFileGeneratorCommand($path, $argument);

        if ($response === true) {
            $this->type ?: $this->type = 'Command';
            $output->writeln(ucfirst($this->type).' created successfully');

            return;
        }
        $output->writeln($response);
    }