{@inheritDoc}

@param InputInterface $input
@param OutputInterface $output
491177
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (!Uuid::isValid($input->getArgument('uuid'))) {
            throw new Exception('Invalid UUID (' . $input->getArgument('uuid') . ')');
        }

        $uuid = Uuid::fromString($input->getArgument('uuid'));

        $table = $this->getHelperSet()->get('table');
        $table->setLayout(TableHelper::LAYOUT_BORDERLESS);

        $table->addRows(array(
            array('encode:', 'STR:', (string) $uuid),
            array('',        'INT:', (string) $uuid->getInteger()),
        ));

        if ($uuid->getVariant() != Uuid::RFC_4122) {
            $table->addRows(array(
                array('decode:', 'variant:', 'Not an RFC 4122 UUID'),
            ));

            $table->render($output);

            return;
        }

        switch ($uuid->getVersion()) {
            case 1:
                $version = '1 (time and node based)';
                break;
            case 2:
                $version = '2 (DCE security based)';
                break;
            case 3:
                $version = '3 (name based, MD5)';
                break;
            case 4:
                $version = '4 (random data based)';
                break;
            case 5:
                $version = '5 (name based, SHA-1)';
                break;
        }

        $table->addRows(array(
            array('decode:', 'variant:', 'RFC 4122'),
            array('',        'version:', $version),
        ));

        if ($uuid->getVersion() == 1) {
            $table->addRows(array(
                array('', 'content:', 'time:  ' . $uuid->getDateTime()->format('c')),
                array('', '', 'clock: ' . $uuid->getClockSequence() . ' (usually random)'),
                array('', '', 'node:  ' . substr(chunk_split($uuid->getNodeHex(), 2, ':'), 0, -1)),
            ));
        }

        if ($uuid->getVersion() == 4) {
            $table->addRows(array(
                array('', 'content:', substr(chunk_split($uuid->getHex(), 2, ':'), 0, -1)),
                array('', '', '(no semantics: random data only)'),
            ));
        }

        if ($uuid->getVersion() == 3 || $uuid->getVersion() == 5) {
            $table->addRows(array(
                array('', 'content:', substr(chunk_split($uuid->getHex(), 2, ':'), 0, -1)),
                array('', '', '(not decipherable: MD5 message digest only)'),
            ));
        }

        $table->render($output);
    }
260941
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $errOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output;
        $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
        $errOutput->setVerbosity(OutputInterface::VERBOSITY_NORMAL);

        $batchSize = NumberUtils::bound($input->getOption('batch-size'), 1, 1000);
        $batchDelay = NumberUtils::bound($input->getOption('batch-delay'), 100, 600000);
        $since = $input->getOption('since');
        $until = $input->getOption('until');
        $context = json_decode($input->getOption('context') ?: '{}', true);
        $context['tenant_id'] = (string)$input->getOption('tenant-id');
        $streamId = $input->getArgument('stream-id') ? StreamId::fromString($input->getArgument('stream-id')) : null;

        if (!empty($since)) {
            $since = Microtime::fromString(str_pad($since, 16, '0'));
        }

        if (!empty($until)) {
            $until = Microtime::fromString(str_pad($until, 16, '0'));
        }

        $i = 0;
        $receiver = function (Event $event, StreamId $streamId) use ($errOutput, $batchSize, $batchDelay, &$i) {
            ++$i;

            try {
                echo json_encode($event) . PHP_EOL;
            } catch (\Throwable $e) {
                $errOutput->writeln($e->getMessage());
            }

            if (0 === $i % $batchSize) {
                if ($batchDelay > 0) {
                    usleep($batchDelay * 1000);
                }
            }
        };

        if ($streamId) {
            $this->getPbjx()->getEventStore()->pipeEvents($streamId, $receiver, $since, $until, $context);
        } else {
            $this->getPbjx()->getEventStore()->pipeAllEvents($receiver, $since, $until, $context);
        }
    }
462491
public function execute(InputInterface $input, OutputInterface $output)
    {
        $inOut     = $this->wrapIo($input, $output);
        $container = $this->createContainer($this->getComposer(), static::NAME);

        $argAction = static::ARG_ACTION;
        $action    = $inOut->getArgument($argAction);
        switch ($action) {
            case static::ACTION_CONNECT:
                $this->executeConnect($container, $inOut);
                break;
            case static::ACTION_CREATE:
                $this->executeCreate($container, $inOut);
                break;
            default:
                $inOut->writeError("Unknown value `$action` for argument `$argAction`." . PHP_EOL);
                break;
        }
    }
534591
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $container = $this->getApplication()->getContainer();
        $container->configure();

        $classname = $input->getArgument('class');
        $method = $input->getArgument('method');

        if (!$this->confirm($input, $classname, $method)) {
            return;
        }

        $resource = $container->get('locator.resource_manager')->createResource($classname);

        $container->get('code_generator')->generate($resource, 'specification_method', [
            'method' => $method,
            'type' => $this->confirmMethodType($input, $output),
        ]);
    }
694970
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $files = $input->getArgument('files');
        $fileSuffix = ' -f ' . implode(' -f ', $files);

        $command = sprintf('%s stop -d', $fileSuffix);
        $response = $this->getFacade()->runDockerCompose($command);

        if ($output->isVerbose()) {
            $output->writeln($response);
        }
    }
729692
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $output->writeln([
            '----------------',
            'Service DTO generator',
            '----------------',
            ''
        ]);

        $helper      = $this->getHelper('question');
        $questionSet = $this->createQuestionSet();

        $serviceDTOName = $helper->ask($input, $output, $questionSet['serviceDTOName']);
        $serviceDTOType = $helper->ask($input, $output, $questionSet['serviceDTOType']);
        $moduleName     = $helper->ask($input, $output, $questionSet['moduleName']);

        do {
            $propertyNames[] = $helper->ask($input, $output, $questionSet['propertyName']);
            $propertyTypes[] = $helper->ask($input, $output, $questionSet['propertyType']);
        } while ($helper->ask($input, $output, $questionSet['continue']));

        $properties = array_combine($propertyNames, $propertyTypes);

        $configuration    = $this->appConfiguration->getConfiguration();
        $serviceNamespace = $configuration['framework']['root_namespace'] . 'Application\Service';

        $serviceDTOData = [
            'namespace'  => $serviceNamespace,
            'class'      => $serviceDTOName,
            'type'       => $serviceDTOType,
            'module'     => $moduleName,
            'properties' => $properties
        ];

        (new ServiceDTOGenerator($serviceDTOData))->generate();

        $output->writeln('Service ' . strtolower($serviceDTOType) . ' generated successfully!');
    }
152039
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->purgeMissingFamilies($output);
        $this->purgeMissingAttributes($output);
    }
940065
public function run(InputInterface $input, OutputInterface $output)
    {
        $this->setInput($input);
        $this->setOutput($output);

        return parent::run($input, $output);
    }
893976
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('Available templates:');
        foreach ($this->factory->getAllNames() as $template_name) {
            $output->writeln('* '.$template_name);
        }
        $output->writeln('');
    }
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);
    }
1256620
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $output->writeln([
            '----------------',
            'Domain entity generator',
            '----------------',
            ''
        ]);

        $helper      = $this->getHelper('question');
        $questionSet = $this->createQuestionSet();
        $entityName  = $helper->ask($input, $output, $questionSet['entityName']);

        do {
            $propertyNames[] = $helper->ask($input, $output, $questionSet['propertyName']);
            $propertyTypes[] = $helper->ask($input, $output, $questionSet['propertyType']);
        } while ($helper->ask($input, $output, $questionSet['continue']));

        $properties = array_combine($propertyNames, $propertyTypes);

        $configuration   = $this->appConfiguration->getConfiguration();
        $entityNamespace = $configuration['framework']['root_namespace'] . 'Domain\Entity';

        $entityData = [
            'namespace'  => $entityNamespace,
            'class'      => $entityName,
            'properties' => $properties
        ];

        (new EntityGenerator($entityData))->generate();

        $output->writeln('Entity generated successfully!');
    }
289977
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (null === $this->configurationChain) {
            $this->configurationChain = $this->getContainer()->get('kunstmaan_search.search_configuration_chain');
        }
        /**
         * @var string
         * @var SearchConfigurationInterface $searchConfiguration
         */
        foreach ($this->configurationChain->getConfigurations() as $alias => $searchConfiguration) {
            $searchConfiguration->deleteIndex();
            $output->writeln('Index deleted : ' . $alias);
        }
    }
174037
protected function execute(InputInterface $input, OutputInterface $output) : void
    {
        $io     = $this->getIO($input, $output);
        $config = $this->getConfig($input->getOption('configuration'), true);
        $repo   = new Repository();
        $args   = new Config\Options(['file' => $input->getOption('message')]);
        $name   = $input->getArgument('hook');
        $class  = '\\CaptainHook\\App\\Runner\\Hook\\' . Util::getHookCommand($name);

        /** @var \CaptainHook\App\Runner\Hook $hook */
        $hook = new $class($io, $config, $repo, $args);
        $hook->run();
    }
342961
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->cacheService->system()->clear();
        $this->cacheService->user()->clear();
        $output->writeln('Done!');
        return null;
    }
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);
    }
94336
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setIo($input, $output);

        $sourceDir = $this->container['config']['source.directory'];
        $outputDir = $this->container['config']['build.directory'];

        $output->writeln("<info>Compiling <path>{$sourceDir}</path> into <path>{$outputDir}</path></info>");

        $total = $this->runTimedTask(function () use ($sourceDir, $outputDir) {

            if ( ! $this->input->getOption('no-clean')) {
                $this->runCleanTask($outputDir);
            }

            $this->runBuildTask($sourceDir, $outputDir);

            if ( ! $this->input->getOption('no-gulp')) {
                $this->runGulpTask();
            }

        });

        $output->writeln("<info>Built in <time>{$total}ms</time></info>");
    }
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();
    }