Execute the generate command
@param  InputInterface $input
@param  OutputInterface $output
@throws \Exception
352347
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $destination = (string) $input->getOption('destination');

        if (!is_readable(dirname($destination))
            || !is_readable($destination) && !mkdir($destination, 0755, true)
        ) {
            throw new \Exception(sprintf('Unable to read output directory [%s]', $destination));
        }

        $wsdlToClass = new WsdlToClass(
            new Wsdl((string) $input->getArgument('wsdl')),
            $destination,
            (string) $input->getOption('namespace'),
            new RegexParser(),
            new TwigGenerator($input->getOption('template')),
            new ResourceWriter(),
            new Printer(new Printer\SymfonyOutputBridge($output))
        );

        $wsdlToClass->execute();
    }
647715
protected function execute(InputInterface $input, OutputInterface $output)
  {
    $name = $input->getArgument('name');
    $class = implode('', array_map('ucfirst', explode('_', str_replace(':', '_', $name))));

    if ($this->add($name, $class)) {
      return $output->writeln('<info>Command "' . $class . '" has been successfully created.</info>');
    }

    return $output->writeln('Command "' . $class . '" already exists.');
  }
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('');
    }
515278
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $errOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output;
        $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
        $errOutput->setVerbosity(OutputInterface::VERBOSITY_NORMAL);

        $interval = NumberUtils::bound($input->getOption('interval'), 1, 60);
        $context = json_decode($input->getOption('context') ?: '{}', true);
        $context['tenant_id'] = (string)$input->getOption('tenant-id');
        $streamId = StreamId::fromString($input->getArgument('stream-id'));

        $eventStore = $this->getPbjx()->getEventStore();
        $since = Microtime::create();

        while (true) {
            $event = null;
            $slice = $eventStore->getStreamSlice($streamId, $since, 25, true, false, $context);

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

            if ($event instanceof Event) {
                $since = $event->get('occurred_at');
            }

            sleep($interval);
        }
    }
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();
    }
136572
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $start = microtime(true);
        $style = new SymfonyStyle($input, $output);
        $style->setDecorated(true);
        $style->title($this->description);

        $util = new Util();
        $source = $util->checkSource($input);
        if ($input->getOption('diff')) {
            $source = $util->getDiffSource();
        }

        $sources = $this->getAllFiles(explode(' ', $source));
        $exitCode = 0;
        $columnSize = 80;
        $errors = '';
        foreach ($sources as $line => $source) {
            if (($line % $columnSize) == 0) {
                $style->newLine();
            }

            $cmd = 'php -l '.$source;
            $process = new Process($cmd);
            $process->setTimeout(3600)->run(function ($type, $buffer) use ($style, &$errors) {
                if (strpos($buffer, 'No syntax errors') !== false || Process::ERR == $type) {
                    $style->write('.');

                    return;
                }

                $style->write('<error>E</>');
                $errors = $buffer;
            });

            if (!$exitCode) {
                $exitCode = $process->getExitCode();
            }
        }

        $end = microtime(true);
        $time = round($end - $start);

        $style->newLine();
        $output->write($errors);
        $style->newLine();

        $style->section('Results');
        $output->writeln('<info>Command: php -l FILE</>');
        $output->writeln('<info>Files: '.count($sources).'</>');
        $output->writeln('<info>Time: '.$time.' seconds</>');
        $style->newLine();

        return $exitCode;
    }
343902
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (strtolower(
        $this->_config->get('driver')) == 'mysql') {
            $output->writeln('<error>This command is not supported on MySQL databases, only SQLite!</error>');
        } else {
            unlink($this->_config->get('sqlite_file'));
            $file = fopen($this->_config->get('sqlite_file'), 'w');
            fwrite($file, '');
            fclose($file);

            $output->writeln('SQLite database has been reset!');
        }
    }
1054943
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);
        
        $builder = new EntityBuilder($this->getConfiguration(), $output);
        
        $output->writeln('<comment>Start build application</comment>');
        $builder->generateMetadata();
        $entityName = $input->getArgument('name');
        
        $tables = $builder->getSchema()->getTables()->filter(function (Table $table) use ($entityName) {
            return $entityName === $table->getTableName();
        });
        
        if ($tables->count() == 1) {
            $builder->generateOneModel($tables->getIterator()->current());
        } else {
            $output->writeln(sprintf('<error>Table "%s" was not found in your schema file</error>', $entityName));
        }
    }
428273
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $name = $input->getArgument('name');
        $aggregated = $this->inputsAggregator->getAggregated($name);
        if ($aggregated instanceof AbstractInput) {
            try {
                $output->writeln($aggregated->getValue());
            } catch (\Exception $e) {
                $output->writeln($e->getMessage());
            }
        } else {
            $output->writeln('This input does not exists');
        }
    }
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
    );
  }
879140
protected function execute(InputInterface $input, OutputInterface $output)
    {
        try {
            $output->writeln([
                'File Creator',
                '=====================',
            ]);

            $filename = $input->getArgument('filename');
            $this->create($filename);

            $output->writeln('Create <bg=yellow;>'.$filename.'.md</> <options=bold>Success!!!</>');
            $output->writeln('');
        } catch (Exception $e) {
            $output->writeln('<bg=red;>'.$e->getMessage().'</> <options=bold></>');
            $output->writeln('');
        }
    }
1062771
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $cmd        = $input->getArgument('cmd');
        $process    = $input->getArgument('server');

        $server = new Server(
            Config::get('name'),
            $process
        );

        $server->$cmd();
    }
330292
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $setting = $input->getOption('setting');
        $options = array();

        if ($setting === null) {
            throw new \Exception('No setting provided!');
        }

        $scan = new \Psecio\Iniscan\Scan();
        $ruleSet = $scan->getRules();

        // see if we can find info about the setting
        $found = array();
        foreach ($ruleSet as $section => $rules) {
            foreach ($rules as $rule) {
                if (isset($rule->test->key) && $rule->test->key === $setting) {
                    if (isset($rule->info)) {
                        $found[] = $rule;
                    }
                }
            }
        }

        if (!empty($found)) {
            $outputHandler = new \Psecio\Iniscan\Command\InfoCommand\Output\Console($output, $options);
            return $outputHandler->render($found);
        } else {
            $output->writeLn('No information found for setting '.$setting);
        }
    }
936606
public function execute(InputInterface $input, OutputInterface $output)
    {
        $description = $input->getArgument('description');
        $time        = date('YmdHis');
        $classname   = $this->generateClassName($time, $description);
        $filepath    = APPDIR.'/src/'.$this->namespaceToPath().$classname.'.php';

        if (! is_dir(dirname($filepath))) {
            mkdir(dirname($filepath), 0775, true);
        }

        $view = $this->newMigrationView;

        $view->description($description);
        $view->classname($classname);
        $view->timestamp($time);

        file_put_contents($filepath, (string) $view);

        $message = '  Created migration file '.$filepath;

        // Output message padded by newlines
        $output->write(['', $message, ''], true);
    }
1242561
protected function runCommand(InputInterface $input, OutputInterface $output)
    {
        $appName = $input->getArgument('app-name');
        $indices = $this
            ->repositoryBucket
            ->findRepository($appName)
            ->getIndices();

        self::printIndices(
            $input,
            $output,
            $indices
        );
    }
491684
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $method = $this->method;
        $this->setHelperSet($this->getApplication()->getHelperSet());
        if ($this->argument != null) {
            $argument = $input->getArgument($this->argument);
            $this->$method($argument);

            return;
        }

        $this->$method($input,$output);
    }
965828
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);

        $configurationIdentifier = $input->getArgument('identifier');
        $configurationValue = json_encode($this
            ->configurationManager
            ->get($configurationIdentifier));

        $this->printMessage(
            $output,
            'Configuration',
            $configurationIdentifier . ' : "' . $configurationValue . '"'
        );

        $this->finishCommand($output);
    }