public function OutputFormatter::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Formatter/OutputFormatter.php \Symfony\Component\Console\Formatter\OutputFormatter::__construct()
Initializes console output formatter.
Parameters
bool $decorated Whether this formatter should actually decorate strings:
OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances:
File
- vendor/
symfony/ console/ Formatter/ OutputFormatter.php, line 43
Class
- OutputFormatter
- Formatter class for console output.
Namespace
Symfony\Component\Console\FormatterCode
public function __construct($decorated = false, array $styles = array()) {
$this->decorated = (bool) $decorated;
$this
->setStyle('error', new OutputFormatterStyle('white', 'red'));
$this
->setStyle('info', new OutputFormatterStyle('green'));
$this
->setStyle('comment', new OutputFormatterStyle('yellow'));
$this
->setStyle('question', new OutputFormatterStyle('black', 'cyan'));
foreach ($styles as $name => $style) {
$this
->setStyle($name, $style);
}
$this->styleStack = new OutputFormatterStyleStack();
}