@param IInput $input
@param IOutput $output
@param IConsole $console

@return bool
971781
public function run(IInput $input, IOutput $output, IConsole $console) {
        if ($input->hasOption('--help')) {
            $args = $input->getArgument('args');
            $subject = array_shift($args);

            $console->parseString("help $subject");

            return false;
        }
    }
1161057
protected function execute(Input $input, Output $output) {
        return $this->cmd->execute($input,$output,$this);
    }
976113
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->bootstrap($input, $output);

        $environment = $input->getOption('environment');
        $format = $input->getOption('format');

        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 ($format !== null) {
            $output->writeln('<info>using format</info> ' . $format);
        }

        $output->writeln('<info>ordering by </info>' . $this->getConfig()->getVersionOrder() . " time");

        // print the status
        return $this->getManager()->printStatus($environment, $format);
    }
257741
protected function execute(InputInterface $input, OutputInterface $output)
    {
        /**
         * GENERATE THE BUNDLEBUNDLE
         */
        $bundleBundleDir = sprintf(self::BUNDLE_NAME_MASK, 'Bundle');

        // GravitonDynBundleBundle
        $bundleName = str_replace('/', '', $bundleBundleDir);

        // bundlebundle stuff..
        $this->bundleBundleNamespace = $bundleBundleDir;
        $this->bundleBundleDir = $input->getOption('srcDir') . $bundleBundleDir;
        $this->bundleBundleClassname = $bundleName;
        $this->bundleBundleClassfile = $this->bundleBundleDir . '/' . $this->bundleBundleClassname . '.php';

        $filesToWorkOn = $this->definitionLoader->load($input->getOption('json'));

        if (count($filesToWorkOn) < 1) {
            throw new \LogicException("Could not find any usable JSON files.");
        }

        $templateHash = $this->getTemplateHash();
        $existingBundles = $this->getExistingBundleHashes($input->getOption('srcDir'));

        /**
         * GENERATE THE BUNDLE(S)
         */
        foreach ($filesToWorkOn as $jsonDef) {
            $thisIdName = $jsonDef->getId();
            $namespace = sprintf(self::BUNDLE_NAME_MASK, $thisIdName);

            // make sure bundle is in bundlebundle
            $this->bundleBundleList[] = $namespace;

            $jsonDef->setNamespace($namespace);

            $bundleName = str_replace('/', '', $namespace);
            $bundleDir = $input->getOption('srcDir').$namespace;
            $bundleNamespace = str_replace('/', '\\', $namespace).'\\';

            try {
                $thisHash = sha1($templateHash.PATH_SEPARATOR.serialize($jsonDef));

                $needsGeneration = true;
                if (isset($existingBundles[$bundleDir])) {
                    if ($existingBundles[$bundleDir] == $thisHash) {
                        $needsGeneration = false;
                    }
                    unset($existingBundles[$bundleDir]);
                }

                if ($needsGeneration) {
                    $this->generateBundle($bundleNamespace, $bundleName, $input->getOption('srcDir'));
                    $this->generateGenerationHashFile($bundleDir, $thisHash);
                }

                if ($needsGeneration) {
                    $this->generateResources(
                        $jsonDef,
                        $bundleName,
                        $bundleDir,
                        $bundleNamespace
                    );

                    $output->write(
                        PHP_EOL.
                        sprintf('<info>Generated "%s" from definition %s</info>', $bundleName, $jsonDef->getId()).
                        PHP_EOL
                    );
                } else {
                    $output->write(
                        PHP_EOL.
                        sprintf('<info>Using pre-existing "%s"</info>', $bundleName).
                        PHP_EOL
                    );
                }
            } catch (\Exception $e) {
                $output->writeln(
                    sprintf('<error>%s</error>', $e->getMessage())
                );

                // remove failed bundle from list
                array_pop($this->bundleBundleList);
            }
        }

        // whatever is left in $existingBundles is not defined anymore and needs to be deleted..
        foreach ($existingBundles as $dirName => $hash) {
            $fileInfo = new \SplFileInfo($dirName);
            $bundleClassName = $this->getBundleClassnameFromFolder($fileInfo->getFilename());

            // remove from bundlebundle list
            unset($this->bundleBundleList[array_search($bundleClassName, $this->bundleBundleList)]);

            $this->fs->remove($dirName);

            $output->write(
                PHP_EOL.
                sprintf('<info>Deleted obsolete bundle "%s"</info>', $dirName).
                PHP_EOL
            );
        }

        // generate bundlebundle
        $this->generateBundleBundleClass();
    }
1367874
public function execute(Input $input, Output $output) {
        //$input = Console::input();//new Input();
        //$output = Console::output();//new Output();

        $this->configureIO($input, $output);

        $exitCode = $this->doRun($input, $output);

        return $exitCode;

        try {
            $exitCode = $this->doRun($input, $output);
        }
        catch (\Exception $e) {
            if (!$this->catchExceptions) {
                throw $e;
            }

            $output->renderException($e);

            $exitCode = $e->getCode();
            if (is_numeric($exitCode)) {
                $exitCode = (int)$exitCode;
                if (0 === $exitCode) {
                    $exitCode = 1;
                }
            }
            else {
                $exitCode = 1;
            }
        }

        if ($this->autoExit) {
            if ($exitCode > 255) {
                $exitCode = 255;
            }

            exit($exitCode);
        }

        return $exitCode;
    }
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);
    }
677052
protected function setIO(InputInterface $input, OutputInterface $output)
    {
        $this->io = new ConsoleIO($input, $output, $this->getHelperSet());
    }
405874
protected function ping(InputInterface $input, OutputInterface $output)
    {
        $input;
        //====================================================================//
        // Perform Ping Test
        $result = Splash::Selftest();
        //====================================================================//
        // Output Result
        $output->writeln($result
                ? "<bg=green;fg=white;options=bold>=== SPLASH : PING TEST PASSED </>"
        : "<bg=green;fg=white;options=bold>=== SPLASH : PING TEST PASSED </>");
    }
503861
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        try {
            $this->doExecute($input, $output);
        } catch (\Exception $e) {
            $this->writeException($e);
        }
    }
37351
public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator): void
    {
        $this->configure($input);

        $adminClassNameDetails = $generator->createClassNameDetails(
            $this->adminClassBasename,
            'Admin\\',
            'Admin'
        );

        $adminClassFullName = $adminClassNameDetails->getFullName();
        $this->generateAdmin($io, $generator, $adminClassNameDetails);

        $controllerClassFullName = '';
        if ($this->controllerClassBasename) {
            $controllerClassNameDetails = $generator->createClassNameDetails(
                $this->controllerClassBasename,
                'Controller\\',
                'Controller'
            );

            $this->generateController($input, $io, $generator, $controllerClassNameDetails);

            $controllerClassFullName = $controllerClassNameDetails->getFullName();
        }

        $this->generateService($input, $io, $adminClassFullName, $controllerClassFullName);
    }
483843
protected function execute(InputInterface $input, OutputInterface $output)
    {
        /** @var QuestionHelper $asker */
        $asker = $this->getHelper('question');

        // check for existence and possibly abort
        if (\file_exists($this->configurationFile)) {
            $question = new ConfirmationQuestion(
                'It looks like the configuration file already exists, do you want to overwrite? [y/N]: ',
                false
            );

            if (!$asker->ask($input, $output, $question)) {
                return;
            }
        }

        $output->writeln(sprintf('About to generate API context for environment: <info>%s</info>', $this->environment));

        try {
            $environmentType = new BunqEnumApiEnvironmentType($this->environment);
            $tempfile = tempnam(\sys_get_temp_dir(), 'bunq_');

            if (BunqEnumApiEnvironmentType::CHOICE_PRODUCTION === $this->environment) {
                $question = new Question('Please enter your bunq API key: ', null);
                do {
                    $apiKey = $asker->ask($input, $output, $question);
                } while (null === $apiKey);

                // will create production environment context with supplied application description
                $apiContext = ApiContext::create(
                    $environmentType,
                    $apiKey,
                    $this->applicationDescription,
                    $this->allowedIps
                );

                $apiContext->save($tempfile);
            } else {
                // will create sandbox environment context
                InstallationUtil::automaticInstall(
                    $environmentType,
                    $tempfile,
                    null
                );
            }

            $contents = \file_get_contents($tempfile);

            $output->writeln('Successfully connected to the bunq API, please provide a password to encrypt the configuration file with. Make it strong!');
            $this->apiHelper->store($contents, null, $input, $output, $asker);

            if (false === \unlink($tempfile)) {
                $output->writeln('<error>WARNING: </error> unable to delete temporary installation file, you really should delete this manually: '.$tempfile);
            } else {
                $output->writeln('<info>Success!</info>');
            }
        } catch (\Exception $e) {
            $output->writeln(sprintf('<error>%s</error>', $e->getMessage()));
        }
    }
821227
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = new SymfonyOutput($output);

        $this->input = $input;

        if (method_exists($this, 'handle')) {
            $this->handle();
        }
    }
1326830
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('Registered version providers');
        $providers = $this->manager->getProviders();

        $table = new Table($output);
        $table->setHeaders(array('Alias', 'Class', 'Priority', 'Supported'))
            ->setStyle('borderless');

        foreach ($providers as $alias => $providerEntry) {
            /** @var $provider ProviderInterface */
            $provider = $providerEntry['provider'];
            $supported = $provider->isSupported() ? 'Yes' : 'No';
            $table->addRow(array($alias, get_class($provider), $providerEntry['priority'], $supported));
        }

        $table->render();
    }
243867
public function accepts(InputInterface $input, OutputInterface $output): bool
    {
        return (bool)$this->engine->evaluate(
            $this->expression,
            [ 'event' => $input->getEvent(), 'input' => $input, 'output' => $output ]
        );
    }
423220
protected function runCommand(InputInterface $input, OutputInterface $output)
    {
        $appName = $input->getArgument('app-name');
        list($_, $indexUUID) = $this->getRepositoryAndIndex($input, $output);

        try {
            $this
                ->repositoryBucket
                ->findRepository($appName)
                ->deleteIndex($indexUUID);
        } catch (ResourceNotAvailableException $exception) {
            self::printInfoMessage(
                $output,
                $this->getHeader(),
                'Index not found. Skipping.'
            );
        }
    }
341480
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $errOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output;

        $curie = SchemaCurie::fromString($input->getArgument('curie'));
        $_SERVER['REQUEST_METHOD'] = 'POST';
        $_SERVER['CONTENT_TYPE'] = 'application/json';
        $_SERVER['HTTP_ACCEPT'] = 'application/json';
        $_SERVER['HTTP_ACCEPT_CHARSET'] = 'utf-8';
        $_SERVER['HTTP_USER_AGENT'] = $input->getOption('user-agent') ?: 'pbjx-console/0.x';

        $deviceView = $input->getOption('device-view');
        if (!empty($deviceView)) {
            $_SERVER['DEVICE_VIEW'] = $deviceView;
            putenv('DEVICE_VIEW=' . $deviceView);
        }

        $request = Request::create(
            sprintf(
                '/pbjx/%s/%s/%s/%s',
                $curie->getVendor(),
                $curie->getPackage(),
                $curie->getCategory() ?: '_',
                $curie->getMessage()
            ),
            $_SERVER['REQUEST_METHOD'],
            [], // GET and POST (aka $_REQUEST)
            $_COOKIE,
            $_FILES,
            $_SERVER,
            $input->getArgument('json') ?: '{}'
        );

        /*
         * prepare the request object so http and console processing are virtually the same
         */
        $request->setRequestFormat('json');
        $request->attributes->set('pbjx_vendor', $curie->getVendor());
        $request->attributes->set('pbjx_package', $curie->getPackage());
        $request->attributes->set('pbjx_category', $curie->getCategory());
        $request->attributes->set('pbjx_message', $curie->getMessage());
        $request->attributes->set('pbjx_bind_unrestricted', true);
        $request->attributes->set('pbjx_console', true);
        if (!empty($deviceView)) {
            $request->attributes->set('device_view', $deviceView);
        }

        $this->useInMemoryTransports($input);
        $this->getRequestStack()->push($request);
        $envelope = $this->getPbjxController()->handleAction($request);

        try {
            $this->getPbjx()->triggerLifecycle($envelope, false);
        } catch (\Throwable $e) {
            /*
             * write to std error but return payload as is.  Decorating the envelope
             * is not typically an exception worthy condition.
             */
            $errOutput->writeln('<error>' . $e->getMessage() . '</error>');
        }

        $envelope->set('ok', Code::OK === $envelope->get('code'));
        $output->writeln(json_encode($envelope, $input->getOption('pretty') ? JSON_PRETTY_PRINT : 0));
    }
487696
public function execute(InputInterface $input, OutputInterface $output)
    {
        if (! $this->valid($input->getArgument('token'))) {
            return $this->tokenIsInvalid($output);
        }

        if (! $this->configExists()) {
            mkdir($this->homePath().'/.spark');
        }

        $this->storeToken($input->getArgument('token'));

        $this->tokenIsValid($output);
    }