Execute console command.

@param \Symfony\Component\Console\Input\InputInterface   $input
@param \Symfony\Component\Console\Output\OutputInterface $output

@return void
199112
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $ssl = new OpenSslHasher();
        $key = $ssl->createiv();
        $envset = env_set('APP_TOKEN', $key);

        if ($envset) {
            $output->writeln('<info>App key generated: '.$key.'</>');
        } else {
            $output->writeln('<error>Error generating key!</>');
        }
    }
391077
protected function execute(InputInterface $input, OutputInterface $output)
    {
		$this->input = $input;
		$this->output = $output;
		$this->force = $input->getOption('force');
		
		$helper = $this->getHelper('question');
		
        $userQuestion = new Question('User (root): ', 'root');
		
        $passwordQuestion = new Question('Password (): ', '');
		$passwordQuestion->setHidden(true);
		$passwordQuestion->setHiddenFallback(false);

        $hostQuestion = new Question('Host (localhost): ', 'localhost');
        $driverQuestion = new Question('Driver (pdo_mysql): ', 'pdo_mysql');
		
		$user = $helper->ask($input, $output, $userQuestion);
		$password = $helper->ask($input, $output, $passwordQuestion);
		$host = $helper->ask($input, $output, $hostQuestion);
		$driver = $helper->ask($input, $output, $driverQuestion);
		
		$connectionParams = array(
			'user' => $user,
			'password' => $password,
			'host' => $host,
			'driver' => $driver
		);
		
		try {
			$conn = $this->createConnection($connectionParams);
			
			$sm = $conn->getSchemaManager();
			
			$databases = $sm->listDatabases();
			
			$question = new ChoiceQuestion(
				'Database',
				$databases,
				0
			);
			$question->setErrorMessage('Selected database is not valid');

			$dbName = $helper->ask($input, $output, $question);
			$output->writeln('Chosen database: ' . $dbName);
			
			//Add the dbname property
			$connectionParams['dbname'] = $dbName;
			
			$conn = $this->createConnection($connectionParams);
			
			$sm = $conn->getSchemaManager();
		
			$tables = $sm->listTables();
			
			$this->loadConfiguration();
			
			$progress = new ProgressBar($output, count($tables));
			$progress->start();
			
			foreach ($tables as $table) {
				//$output->writeln($table->getName() . " columns:\n\n");
					
				//Columns
				/*
				foreach ($table->getColumns() as $column) {
					//$output->writeln(' - ' . $column->getName() . ': ' . $column->getType() . "\n");
				}
				*/
					
				//Foreign keys
				$name = $table->getName();
				$table = $sm->listTableDetails($name);
				//$foreignKeys = $table->getForeignKeys();
				//$output->writeln("Foreign keys (" . count($foreignKeys) . ")");
				/*
				foreach ($foreignKeys as $foreignKey) {
					//$output->writeln("\n");
					$foreignColumns = $foreignKey->getForeignColumns();
					$localColumns = $foreignKey->getLocalColumns();
					foreach($foreignColumns as $key => $foreignColumn){
						//$output->writeln($foreignKey->getLocalTableName() . "." . $localColumns[$key] . " <=> " . $foreignKey->getForeignTableName() . "." . $foreignColumn . "\n");
					}
				}
				*/
		
				$primaryKeys = $table->getPrimaryKeyColumns();
				//$output->writeln("Primary keys (" . count($primaryKeys) . ")");
				/*
				foreach ($primaryKeys as $primaryKey) {
					//$output->writeln("\n" . $primaryKey);
				}
				*/
				
				//$output->writeln("\n\n");
				$this->generateCode($name, reset($primaryKeys));
				
				$progress->advance();
			}
			
			$progress->finish();
		} catch(\Exception $ex){
			$output->writeln('Generator has found the current exception: ');
			$output->writeln($ex->getMessage());
		}
    }
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),
        ]);
    }
521780
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $configFilesOption = $input->getOption('config');
        $outputOption = $input->getOption('output');
        $formatOption = $input->getOption('format');

        '@phan-var string $configFilesOption';
        '@phan-var string $outputOption';
        '@phan-var string $formatOption';

        $configFiles       = $this->getPossibleConfigFiles($configFilesOption);
        $configuration     = $this->linterConfigurationLocator->loadConfiguration($configFiles);
        $paths             = $input->getArgument('paths') ?: $configuration->getPaths();
        $outputTarget      = $input->getOption('output');
        $exitWithExitCode  = $input->getOption('exit-code') || $input->getOption('fail-on-warnings');

        '@phan-var string[] $paths';

        if (false == $outputTarget) {
            throw new BadOutputFileException('Bad output file.');
        }

        if ($outputOption === '-') {
            $reportOutput = $output;
        } else {
            $fileHandle = fopen($outputOption, 'w');
            if ($fileHandle === false) {
                throw new \Exception("could not open file '${outputOption}' for writing");
            }

            $reportOutput = new StreamOutput($fileHandle);
        }

        $logger = $this->loggerBuilder->createLogger($formatOption, $reportOutput, $output);

        $report   = new Report();
        $patterns = $configuration->getFilePatterns();

        $files = $this->finder->getFilenames($paths, $patterns, new CallbackFinderObserver(function ($name) use ($logger) {
            $logger->notifyFileNotFound($name);
        }));
        $logger->notifyFiles($files);

        foreach ($files as $filename) {
            $logger->notifyFileStart($filename);
            $fileReport = $this->linter->lintFile($filename, $report, $configuration, $logger);
            $logger->notifyFileComplete($filename, $fileReport);
        }

        $logger->notifyRunComplete($report);

        $exitCode = 0;
        if ($report->countIssuesBySeverity(Issue::SEVERITY_ERROR) > 0) {
            $exitCode = 2;
        } else if ($exitWithExitCode && $report->countIssues() > 0) {
            $exitCode = 2;
        }

        $this->eventDispatcher->addListener(
            ConsoleEvents::TERMINATE,
            function (ConsoleTerminateEvent $event) use ($exitCode) {
                $event->setExitCode($exitCode);
            }
        );
    }
489985
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $finder     = new Finder();
        $filesystem = new Filesystem();
        $filesystem->remove($finder->directories()->in($this->getLanguageBasePath()));
    }
930664
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $filename = $input->getArgument('filename');

        '@phan-var string $filename';

        $output->writeln("Parsing input file <comment>{$filename}</comment>.");

        $tokens = $this->tokenizer->tokenizeStream($filename);

        $output->write($this->tokenPrinter->printTokenStream($tokens));
    }
869287
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);
        $plugins = $this
            ->pluginRepository
            ->findAll();

        /**
         * @var Plugin $plugin
         */
        foreach ($plugins as $plugin) {
            $this->printMessage(
                $output,
                'Plugin',
                $plugin->getNamespace() . ' - [Hash : ' . $plugin->getHash() . ']'
            );
        }

        $this->finishCommand($output);
    }
828092
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->addOption('--environment', '-e', InputArgument::OPTIONAL);
        $input->setOption('environment', getenv('RAD_ENVIRONMENT'));
        parent::execute($input, $output);
    }
980225
public function doRun(InputInterface $input, OutputInterface $output)
    {
        $this->setIO($input, $output);
        parent::doRun($input, $output);
    }
1281580
public function run(InputInterface $input = null, OutputInterface $output = null)
    {
        if ($input !== null) {
            $in = $input;
        } else {
            $in = $this->getInput();
        }

        return parent::run($in, $output);
    }
435391
protected function execute(InputInterface $input, OutputInterface $output)
    {	
    	$post = new PostBuilder(
            $this->filesystem,
            $input->getArgument('title'),
            $input->getOption('m')
        );

        $post->build();

        $output->writeln(

            sprintf("<info>Post \"%s\" was generated successfully.</info>", $input->getArgument('title'))
        );
    }
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);
    }
319055
public function run(InputInterface $input = null, OutputInterface $output = null)
    {
        $this->setAutoExit(false);
        $this->getContainer()->boot();
        $this->setDispatcher($this->getContainer()['dispatcher']);
        $this->getContainer()['dispatcher']->dispatch(ConsoleEvents::INIT, new ConsoleEvent($this));
        $this->getContainer()->flush();
        $exitCode = parent::run($input, $output);
        $this->getContainer()->terminate(new Request(), new Response());

        return $exitCode;
    }
616236
public function run(Input\InputInterface $input = null, Output\OutputInterface $output = null)
    {
        if (null === $input) {
            $input = new Input\ArgvInput();
        }

        if (null === $output) {
            $output = new Output\ConsoleOutput();
        }

        $this->_input  = $input;
        $this->_output = $output;

        $this->configureIO($this->_input, $this->_output);

        $this->_setup();

        $this->_loadPlugins();

        parent::run($this->_input, $this->_output);
    }
21631
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setup->getLocator()->setParams(
            array(
                'release' => $input->getArgument('release'),
                'path' => $input->getOption('path'),
                'scriptName' => $input->getOption('script')
            )
        );

        $queries = $this->setup($input);

        $this->display($input, $output, $queries);
    }
1133146
public function run(InputInterface $input, OutputInterface $output)
    {
        return parent::run(
            $this->input = $input, $this->output = new OutputStyle($input, $output)
        );
    }
1068332
public function execute(InputInterface $input = null, OutputInterface $output = null)
    {
        $this->application->addCommands($this->servicesCommandsProvider->getCommands());
        $this->application->run($input, $output);
    }