Adds extra styles to the output

@param OutputInterface $output
965643
protected function addOutputFormatterStyles(OutputInterface $output)
    {
        foreach ($this->getOutputFormatterStyles() as $name => $style) {
            $output->getFormatter()->setStyle($name, $style);
        }
    }
355294
public function sendOutput(String $output, String $colour='white', String $backgroundColor='black')
	{
		fwrite(STDOUT, $this->getText($output, $colour, $backgroundColor));
	}
9717
public function loadOutputStyles()
    {
        $styleOne   = array('bold');
        $styleTwo   = array('bold', 'underscore');
        $style      = new OutputFormatterStyle();
        $this->output->getFormatter()->setStyle('normal', $style);
        $style      = new OutputFormatterStyle('white', 'red', $styleOne);
        $this->output->getFormatter()->setStyle('warning', $style);
        $style      = new OutputFormatterStyle('white', 'green', $styleOne);
        $this->output->getFormatter()->setStyle('general', $style);
        $style      = new OutputFormatterStyle('white', 'blue', $styleOne);
        $this->output->getFormatter()->setStyle('notice', $style);
        $style      = new OutputFormatterStyle('white', 'red', $styleTwo);
        $this->output->getFormatter()->setStyle('fatal_error', $style);
    }
512450
private function _generateIco(OutputInterface $output)
    {
        $filename = $this->_outputFolder . "favicon.ico";
        $output->writeln("Creating: <info>{$filename}</info>");


        $originalImage = $this->_imagine->open($this->_inputFile)->strip();
        $originalImage->copy()
                ->resize(new \Imagine\Image\Box(16, 16))
                ->save('tmp-16.bmp');

        $icon = $this->_imagine->open('tmp-16.bmp');
        $icon->layers()
                ->add($originalImage->copy()->resize(new \Imagine\Image\Box(32, 32)));

        if ($this->_use48Icon)
        {
            $icon->layers()->add($originalImage->copy()->resize(new \Imagine\Image\Box(48, 48)));
        }
        if ($this->_use64Icon)
        {
            $icon->layers()->add($originalImage->copy()->resize(new \Imagine\Image\Box(64, 64)));
        }

        $icon->save($filename, array(
            'flatten' => false
        ));

        unlink('tmp-16.bmp');
        return true;
    }
93182
private function dumpAssetic(OutputInterface $output)
    {
        $command = $this->getApplication()->find('assetic:dump');

        $arguments = [
            'command' => 'assetic:dump',
            '--env' => 'prod',
            '--no-debug' => true,
        ];

        $input = new ArrayInput($arguments);

        return $command->run($input, $output);
    }
1209331
protected function cleanOutput($output)
    {
        $output = str_replace($this->extraOutput, null, $output);

        return strtr($output, [
            'stdin: is not a tty' => null,
        ]);
    }
1324908
protected static function configureFormatter(OutputInterface $output)
    {
        $formatter = $output->getFormatter();
        $formatter->setStyle('system', new OutputFormatterStyle('green'));
        $formatter->setStyle('line', new OutputFormatterStyle('yellow'));
        $formatter->setStyle('fail', new OutputFormatterStyle('red'));
        $formatter->setStyle('info', new OutputFormatterStyle('blue'));
        $formatter->setStyle('body', new OutputFormatterStyle('white'));
        $formatter->setStyle('strong', new OutputFormatterStyle(null, null, ['bold']));
    }
1170854
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $verbosity = PhpVersions::VERBOSITY_NORMAL;
        $verbosity = $input->getOption('verbose') == 2 ? PhpVersions::VERBOSITY_VERBOSE : $verbosity;
        $verbosity = $input->getOption('verbose') == 3 ? PhpVersions::VERBOSITY_DEBUG : $verbosity;
        $verbosity = $input->getOption('quiet') ? PhpVersions::VERBOSITY_SILENT : $verbosity;
        $phpVersions = new PhpVersions(null, $verbosity);

        $versions = $input->getArgument('php');
        $version = array_shift($versions);
        if (empty($version)) {
            $version = 'latest';
        }

        $info = $phpVersions->getInfo($version);

        $output->write($info['version']);
    }
943860
private function reportChange(OutputInterface $output)
    {
        $this->end = microtime(true);

        $output->writeLn(
            sprintf('[DROID-RESULT] %s', json_encode(array(
                'changed' => $this->change,
                'start' => $this->start,
                'end' => $this->end,
            )))
        );
    }
467282
protected function registerCommands(OutputInterface $output)
    {
        $container = $this->kernel->getContainer();

        foreach ($this->kernel->getBundles() as $bundle) {
            if ($bundle instanceof Bundle) {
                $bundle->registerCommands($this);
            }
        }

        if ($container->hasParameter('console.command.ids')) {
            foreach ($container->getParameter('console.command.ids') as $id) {
                $this->add($container->get($id));
            }
        }

        $this->addComposerCommands();

        /** @var ComposerJson $file */
        $file = $container->get('tenside.composer_json');

        // Add non-standard scripts as own commands - keep this last to ensure we do not override internal commands.
        if ($file->has('scripts')) {
            foreach (array_keys($file->get('scripts')) as $script) {
                if (!defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) {
                    if ($this->has($script)) {
                        $output->writeln(
                            sprintf(
                                '<warning>' .
                                'A script named %s would override a native function and has been skipped' .
                                '</warning>',
                                $script
                            )
                        );
                        continue;
                    }
                    $this->add(new ScriptAliasCommand($script));
                }
            }
        }
    }
62321
protected function listExport(OutputInterface $output)
    {
        $table = new Table($output);

        foreach ((new ExportQuery)->find() as $export) {
            $table->addRow([
                $export->getRef(),
                $export->getTitle(),
                $export->getDescription()
            ]);
        }

        $table
            ->setHeaders([
                'Reference',
                'Title',
                'Description'
            ])
            ->render()
        ;
    }
1065869
public function onVisitProcessed(OutputInterface $output)
    {
        ++$this->processed;

        $percent = ceil($this->processed / $this->amountOfVisits * 100);

        if ($percent > $this->processedPercent
            && $percent % $this->percentStep === 0
        ) {
            $output->writeln(sprintf('%d%% processed. <comment>%s</comment>', $percent, $this->timer->__toString()));

            $this->processedPercent = $percent;
        }
    }
1037064
public function addOutput($output) {
        $output = $this->outputNormalizer->normalize([$output])[0];

        $this->outputs[] = $output;

        return $this;
    }
755824
protected function configureIO(InputInterface $input, OutputInterface $output)
    {
        if (true === $input->hasParameterOption(['--ansi'], true)) {
            $output->setDecorated(true);
        } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) {
            $output->setDecorated(false);
        }

        if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) {
            $input->setInteractive(false);
        } elseif (\function_exists('posix_isatty')) {
            $inputStream = null;

            if ($input instanceof StreamableInputInterface) {
                $inputStream = $input->getStream();
            }

            if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) {
                $input->setInteractive(false);
            }
        }

        switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
            case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break;
            case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break;
            case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break;
            case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break;
            default: $shellVerbosity = 0; break;
        }

        if (true === $input->hasParameterOption(['--quiet', '-q'], true)) {
            $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
            $shellVerbosity = -1;
        } else {
            if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
                $shellVerbosity = 3;
            } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
                $shellVerbosity = 2;
            } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
                $shellVerbosity = 1;
            }
        }

        if (-1 === $shellVerbosity) {
            $input->setInteractive(false);
        }

        putenv('SHELL_VERBOSITY='.$shellVerbosity);
        $_ENV['SHELL_VERBOSITY'] = $shellVerbosity;
        $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity;
    }
1184158
public function initializeInstallOutput(OutputInterface $output)
    {
        $progressBar = null;
        if ($output->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE) {
            // Low verbosity, use progress bar.
            $progressBar = new ProgressBar($output);
            $progressBar->setFormat(' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s% [%message%]');
        }

        return new InstallOutput(new ConsoleLogger($output), $progressBar);
    }
1324168
protected function wrapWithOutsideComponents($output)
    {
        return $this->renderComponents(self::SECTION_BEFORE)
        . $output
        . $this->renderComponents(self::SECTION_AFTER);
    }
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);
    }