Get the dumper name from the input object and tries to dump all sitemap
content.

@param InputInterface  $input  The input interface
@param OutputInterface $output The output interface

@return int|null|void
764917
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);

        $builderName = $input->getArgument('builder-name');
        $basepath = $input->getArgument('basepath');
        $language = $input->getOption('language');
        $sitemapDumper = $this
            ->container
            ->get('elcodi.sitemap_dumper.' . $builderName);

        $sitemapDumper->dump(
            $basepath,
            $language
        );

        $this->finishCommand($output);
    }
808299
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $headers = ['queue', 'class', 'method', 'args', 'priority', 'attempts', 'error'];
        $this->_jobCollection->setCurPage($input->getArgument(self::PAGE_ARGUMENT));
        $this->_jobCollection->setPageSize($input->getArgument(self::PER_PAGE_ARGUMENT));
        $this->_jobCollection->addOrder('priority', JobCollection::SORT_ORDER_ASC);
        $this->_jobCollection->addOrder('next_run_at', JobCollection::SORT_ORDER_ASC);

        if ($queue = $input->getArgument(self::QUEUE_ARGUMENT)) {
            $this->_jobCollection->addFieldToFilter('queue', $queue);
        }
        $jobs = $this->_jobCollection->toArray();

        // Pre-calculate the max column widths
        $maxWidths = [];
        foreach ($headers as $header) {
            $maxWidths[$header] = strlen($header) + 2;
        }
        foreach ($jobs['items'] as $job) {
            foreach ($headers as $header) {
                $newLength = strlen($job[$header]) + 2;
                if ($newLength > $maxWidths[$header]) {
                    $maxWidths[$header] = $newLength;
                }
            }
        }
        $maxWidths = array_values($maxWidths);

        $table = new TextTable([
            'columnWidths' => $maxWidths,
            'decorator' => 'ascii',
            'AutoSeparate' => TextTable::AUTO_SEPARATE_HEADER,
            'padding' => 1
        ]);

        $table->appendRow($headers);
        foreach ($jobs['items'] as $job) {
            $rowArr = [];
            foreach ($headers as $header) {
                $rowArr[$header] = $job[$header];
            }
            $table->appendRow($rowArr);
        }
        $output->writeln($table->render());
    }
464270
public function execute(InputInterface $input, OutputInterface $output)
    {
        $outputPath = DATADIR;

        $output->write(['', '  Generating install files...', ''], true);

        $this->dumpStructure($outputPath);
        $output->writeln('  Exported DB structure');

        $this->dumpData($outputPath);
        $output->write(['  Exported DB data', ''], true);
    }
489985
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $finder     = new Finder();
        $filesystem = new Filesystem();
        $filesystem->remove($finder->directories()->in($this->getLanguageBasePath()));
    }
584800
protected function execute(InputInterface $input, OutputInterface $output)
  {
    $results = Cache::flush();

    if ($results) return $output->writeln('<info>Cleared cache!</info>');

    return $output->writeln('Nothing to clear');
  }
1072702
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->modx->cacheManager->refresh();
        $output->writeln('### Cache has been refreshed(cleared) ###');
    }
915365
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $config = $this->parameters;
        $recursive = $input->getOption('recursive');
        $machine = $input->getOption('machine') ? $config->get('dotfiles.machine_name') : 'defaults';
        $backupDir = $config->get('dotfiles.backup_dir')."/src/$machine/home";
        $sourcePath = $input->getArgument('path');

        // detect source path
        $originPath = $this->detectPath($sourcePath);
        $relativePath = Toolkit::getRelativePath($originPath);
        if (0 === strpos($relativePath, '.')) {
            $relativePath = substr($relativePath, 1);
        }
        $relativePath = str_replace('.'.$sourcePath, $sourcePath, $relativePath);
        $targetPath = $backupDir.'/'.$relativePath;

        Toolkit::ensureDir($backupDir);

        $basename = basename($sourcePath);
        if (0 === strpos($basename, '.')) {
            $targetPath = str_replace('.'.$sourcePath, $basename, $targetPath);
        }

        if (is_dir($originPath)) {
            $this->doAddDir($originPath, $targetPath, $recursive);
        } else {
            $this->doAddFile($originPath, $targetPath);
        }
    }
1259806
protected function execute(InputInterface $input, OutputInterface $output)
    {
        // {{
        $this->title('配置信息');
        // }}

        $this->treeView(Config::get(''));
        $this->newLine();

        return 0;
    }
1026910
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (!$this->apiHelper->restore($this->getHelper('question'), $input, $output)) {
            return;
        }

        $bunqUser = $this->apiHelper->currentUser()->getBunqUser();

        /** @var Pointer $pointer */
        foreach ($bunqUser->getAlias() as $pointer) {
            $output->writeln(\sprintf('<info>%s</info>: %s', $pointer->getType(), $pointer->getValue()));
        }
    }
285594
protected function execute( InputInterface $input, OutputInterface $output )
	{
		$context = $this->getContainer()->get( 'aimeos.context' )->get( false, 'command' );
		$context->setEditor( 'aimeos:cache' );

		$localeManager = \Aimeos\MShop::create( $context, 'locale' );

		foreach( $this->getSiteItems( $context, $input ) as $siteItem )
		{
			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false );

			$lcontext = clone $context;
			$lcontext->setLocale( $localeItem );

			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $lcontext );
			$lcontext->setCache( $cache );

			$output->writeln( sprintf( 'Clearing the Aimeos cache for site <info>%1$s</info>', $siteItem->getCode() ) );

			\Aimeos\MAdmin::create( $lcontext, 'cache' )->getCache()->clear();
		}
	}
284393
public function execute(InputInterface $input, OutputInterface $output)
    {
        /** @var QuestionHelper $helper */
        $helper = $this->getHelper('question');

        $copyrightYear = date('Y');
        $packageName = 'Unknown';
        $packageOwner = 'Contributors';
        $packageOwnerEmail = '';

        if ($input->hasOption('name')) {
            $packageName = $input->getOption('name');
        } else {
            $packageName = $helper->ask($input, $output, new Question(
                'What is the package name? '
            ));
        }

        if ($input->hasOption('owner')) {
            $packageOwner = $input->getOption('owner');
        } else {
            $packageOwner = $helper->ask($input, $output, new Question(
                'Who is the package owner? '
            ));
        }

        if ($input->hasOption('email')) {
            $packageOwnerEmail = $input->getOption('email');
        } else {
            $packageOwnerEmail = $helper->ask($input, $output, new Question(
                'What is the contact email of the owner? (Optional) ',
                ''
            ));
        }

        $template = file_get_contents(
            __DIR__ . '/../../../../resources/project/formatter.yml'
        );

        $template = str_replace('<year>', $copyrightYear, $template);
        $template = str_replace('<owner>', $packageOwner, $template);
        $template = str_replace('<package>', $packageName, $template);
        $template = str_replace('<email>', $packageOwnerEmail, $template);

        $filesystem = new Filesystem();

        if ($filesystem->exists('.formatter.yml')) {
            if ($helper->ask($input, $output, new ConfirmationQuestion(
                '.formatter.yml already exists. Overwrite? (y/N) ',
                false
            ))) {
                $filesystem->dumpFile('.formatter.yml', $template);
                $output->writeln('Wrote .formatter.yml');
            }
        } else {
            $filesystem->dumpFile('.formatter.yml', $template);
            $output->writeln('Wrote .formatter.yml');
        }

        if (!$filesystem->exists('.editorconfig')) {
            $filesystem->dumpFile(
                '.editorconfig',
                file_get_contents(
                    __DIR__ . '/../../../../resources/project/editorconfig'
                )
            );
            $output->writeln('Wrote .editorconfig');
        }

        return 0;
    }
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);
    }
130126
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);

        $days = $input->getArgument('days');
        $entries = $this
            ->metricLoader
            ->loadEntriesFromLastDays($days);

        $nbEntries = count($entries);
        $this->printMessage(
            $output,
            'Metric',
            'Added ' . $nbEntries . ' entries from last ' . $days . ' days'
        );

        $this->finishCommand($output);
    }
537063
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $themeName = $input->getArgument('theme');
        $kernel = $this->getContainer()->get('kernel');
        $dir = $kernel->locateResource('@' . $themeName);
        $namespace = $kernel
            ->getBundle($themeName)
            ->getNamespace()
        ;

        // @codeCoverageIgnoreStart
        if (null === $this->templateParser) {
            $this->templateParser = new TemplateParser($this->getContainer()->get('templating.locator'), $this->getContainer()->get('templating.name_parser'));
        }

        if (null === $this->templateGenerator) {
            $this->templateGenerator = new TemplateGenerator();
        }

        if (null === $this->slotsGenerator) {
            $this->slotsGenerator = new SlotsGenerator();
        }

        if (null === $this->extensionGenerator) {
            $this->extensionGenerator = new ExtensionGenerator();
        }
        // @codeCoverageIgnoreEnd

        $parsedTemplates = $this->templateParser->parse($dir . 'Resources/views/Theme', $kernel->getRootDir(), $themeName);
        $this->addOption('template-name', '', InputOption::VALUE_NONE, '');
        $templates = $parsedTemplates["templates"];
        foreach ($templates as $templateAttributes) {
            $templateFileName = $templateAttributes["name"];
            $templateName = basename($templateFileName, '.html.twig');
            $message = $this->templateGenerator->generateTemplate($dir . 'Resources/config/templates', $themeName, $templateName, $templateAttributes["slots"]);
            $output->writeln($message);
        }

        $message = $this->slotsGenerator->generateSlots($dir . 'Resources/config/slots', $themeName, $parsedTemplates["slots"]);
        $output->writeln($message);

        $message = $this->extensionGenerator->generateExtension($namespace, $dir . 'DependencyInjection', $themeName, $templates);
        $output->writeln($message);
    }
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);
        }
    }
623294
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $outputFile = null;
        if ($file = $input->getOption('output-file')) {
            $outputFile = $file;
        }
        $this->service($input->getArgument($this->argument), $outputFile);
    }
554408
public function execute(InputInterface $input, OutputInterface $output)
    {
        $source = $this->loadFiles($input->getArgument('source'));

        $this->rivescript->load($source);

        $loadedSource = explode('/', $input->getArgument('source'));
        $loadedSource = end($loadedSource);

        $output->writeln('RiveScript Interpreter (PHP) -- Interactive Console v2.0');
        $output->writeln('--------------------------------------------------------');
        $output->writeln('RiveScript Version:       2.0');
        $output->writeln('Currently Loaded Source:  '.$loadedSource);
        $output->writeln('');
        $output->writeln('You are now chatting with a RiveScript bot. Type a message and press Return');
        $output->writeln('to send it. When finished, type "/quit" to exit the interactive console.');
        $output->writeln('');

        $this->waitForUserInput($input, $output);
    }