/** * Display the configuration to the Console. * * @param OutputInterface $output The command-line output. * @return void */ public function displayConfig(OutputInterface $output) { // Title and formatting $output->writeln($this->formatter->yellow->apply('ACTIVE CONFIGURATION OPTIONS:')); $padding = ConsoleUtil::tablify(ConfigStore::get()); $self = $this; // Write the tablified listing to the buffer $output->writeln(ConsoleUtil::indent(YAML::dump(ConfigStore::get(), 1), $this->formatter->green->apply('-> '), function ($line) use($self, $padding) { $pieces = explode(': ', $line); $pieces[0] = str_pad($pieces[0], $padding, ' ', STR_PAD_RIGHT); $pieces[1] = $self->formatter->gold->apply($pieces[1]); return implode(' : ', $pieces); })); // Write any stored messages to the buffer if (count(ConfigStore::$messages) > 0) { foreach (ConfigStore::$messages as $message) { $output->writeln($message); } } echo PHP_EOL; }