Run the command.

@param  InputInterface  $input  Command input.
@param  OutputInterface $output Command output.
@throws \Hodl\Exceptions\ContainerException If something is wrong with the container.
963574
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->init_wordpress();
        $this->setup_filesystem();

        if ($input->getOption('force') === false && (!\defined('WP_DEBUG') || WP_DEBUG === false)) {
            if ($this->confirm_choice($input, $output) === false) {
                return;
            }
        }

        // Setup Snap.
        Snap::create_container();
        Snap::init_config();

        $loader = new Loader();
        $loader->load_theme();

        $config = Snap::get_container()->get('config');

        $root = \get_template_directory();

        if (\is_child_theme()) {
            $root = \get_stylesheet_directory();
        }

        $cache_path = \trailingslashit($root) . \trailingslashit($config->get('theme.cache_directory'));

        // Clear any previously cached templates
        $this->file->rmdir($cache_path.'templates/', true);

        // Make the cache directory if it doesn't exist.
        if (!\is_dir($cache_path)) {
            \wp_mkdir_p($cache_path);
        }

        $config_created = $this->file->put_contents(
            $cache_path . \sha1(NONCE_SALT . 'theme'),
            \serialize($config->get_primed_cache())
        );

        $autoload_created = $this->file->put_contents(
            $cache_path . \sha1(NONCE_SALT . 'classmap'),
            \serialize($loader->get_theme_includes())
        );

        if ($config_created && $autoload_created) {
            $output->writeln('<info>Snap cache was set up successfully.</info>');
            return;
        }

        $output->writeln('<error>Snap cache could not be set up successfully.</error>');
    }
983759
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setIo($input, $output);

        $repo = $this->prepareRepository();

        $this->rebuild();

        $this->deployWithGit($repo);
    }
765115
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $container = $this->getContainer();
        $configBuilder = $container->get('admin.configuration.configbuilder');
        $pool = $container->get('admin.configuration.pool');
        foreach ($pool->getConfigurations() as $id => $attributes) {
            $config = $container->get($id);
            $config->build($configBuilder);
        }
    }
385215
protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        $io         = $this->getIO($input, $output);
        $config     = $this->getConfig($this->configFile, true);
        $repository = new Repository($this->repositoryPath);
        $arguments  = new Config\Options($input->getArguments());

        /** @var \CaptainHook\App\Runner\Hook $hook */
        $class = '\\CaptainHook\\App\\Runner\\Hook\\' . Util::getHookCommand($this->name);
        $hook  = new $class($io, $config, $repository, $arguments);


        $hook->run();
        return 0;
    }
490008
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $logger = $this->getContainer()->get('ringo_php_redmon.instance_logger');
        $manager = $this->getContainer()->get('ringo_php_redmon.instance_manager');
        $instances = $manager->findAll();
        
        if(is_array($instances)) {
            foreach($instances as $instance) {
                $logger
                    ->setInstance($instance)
                    ->execute();
            }
        }
    }
761302
public function execute(InputInterface $input, OutputInterface $output)
    {
        $runner = $this->commandDefinition->getRunner();
        $runner();
    }
1025320
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);
        $plugins = $this
            ->pluginManager
            ->loadPlugins();

        foreach ($plugins as $plugin) {
            $this->printMessage(
                $output,
                'Plugin',
                'Plugin "' . $plugin->getNamespace() . '" installed'
            );
        }

        $this->finishCommand($output);
    }
914566
protected function runCommand(InputInterface $input, OutputInterface $output)
    {
        $repository = $this->getRepository($input, $output);
        $parameters = $input->getOption('parameter');
        self::makeQueryAndPrintResults(
            $input,
            $output,
            function (Query $query) use ($repository, $parameters) {
                return $repository->query($query, $parameters);
            }
        );
    }
653255
protected function runCommand(InputInterface $input, OutputInterface $output)
    {
        $repository = $this->getRepository($input, $output);
        $file = $input->getArgument('file');

        self::exportToFile(
            $file,
            $output,
            function (Query $query) use ($repository) {
                return $repository->query($query);
            }
        );
    }
391571
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);

        $info = $this
            ->getSession()
            ->getInspector()
            ->getSchemaRelations($this->fetchSchemaOid()
        );
        $this->formatOutput($output, $info);
    }
489985
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $finder     = new Finder();
        $filesystem = new Filesystem();
        $filesystem->remove($finder->directories()->in($this->getLanguageBasePath()));
    }
404353
public function doRun(InputInterface $input, OutputInterface $output)
  {
    $this->configure($this->getContext()->config());
    return parent::doRun($input, $output);
  }
216255
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->bootstrap($input, $output);

        $environment = $input->getOption('environment');
        $version = $input->getOption('target');
        $removeAll = $input->getOption('remove-all');

        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 ($version && $removeAll) {
            throw new \InvalidArgumentException('Cannot toggle a breakpoint and remove all breakpoints at the same time.');
        }

        // Remove all breakpoints
        if ($removeAll) {
            $this->getManager()->removeBreakpoints($environment);
        } else {
            // Toggle the breakpoint.
            $this->getManager()->toggleBreakpoint($environment, $version);
        }
    }
201157
protected function execute(InputInterface $input, OutputInterface $output)
    {
        try {
            $url = Platform::getUri();
        } catch (\Exception $e) {
            $output->writeln('<error>The nginx container is not running.</error>');
        }

        try {
            // See if the nginx-proxy is running and use that if it is.
            $process = Docker::inspect(['--format="{{ .State.Running }}"', 'nginx-proxy'], true);
            if (strpos($process->getOutput(), 'true') !== FALSE) {
                $url = 'http://' . Platform::projectName() . '.' . Platform::projectTld();
            }
        }
        catch (\Exception $e) {}

        if ($url) {
            $this->openUrl($url, $this->stdErr, $this->stdOut);
        }
    }
1140758
public function runApplication(InputInterface $input = null, OutputInterface $output = null): void
    {
        $this->getFactory()->createApplication()->run($input, $output);
    }
236040
protected function execute(InputInterface $input, OutputInterface $output)
    {
        // retrieve the current settings
        $options = $this->getCurrentOptions($input, $output);

        // check if docker is installed
        if (false === $this->commandExists('docker')) {
            $output->writeln('Docker is required to run DUnit.');
            return self::ERROR_CODE;
        }
        // loop over each of the docker images specified
        foreach ($options[self::OPTIONS_KEY_IMAGES] as $image) {
            if ($options[self::OPTIONS_KEY_PULL]) {
                passthru(sprintf(
                    self::DOCKER_COMMAND_PULL,
                    escapeshellarg($image)
                ));
                continue;
            }

            $output->writeln('Running against image '.$image);
            if ($options[self::OPTIONS_KEY_SYNTAX]) {
                $output->writeln('Checking syntax');
                // run the syntax checks
                $this->executeCommandForImage(
                    $image,
                    $options[self::OPTIONS_KEY_SYNTAXCOMMAND]
                );
            }
            if ($options[self::OPTIONS_KEY_UNITTESTS]) {
                $output->writeln('Running unit test suite');
                // run the unit tests
                $this->executeCommandForImage(
                    $image,
                    $options[self::OPTIONS_KEY_UNITTESTSCOMMAND]
                );
            }
        }
        return self::NO_ERROR;
    }
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;
    }