function OutputFormatter::__construct
Initializes console output formatter.
Parameters
OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances:
2 calls to OutputFormatter::__construct()
- HtmlOutputFormatter::__construct in vendor/
composer/ composer/ src/ Composer/ Console/ HtmlOutputFormatter.php - HtmlOutputFormatter::__construct in vendor/
composer/ composer/ src/ Composer/ Console/ HtmlOutputFormatter.php
1 method overrides OutputFormatter::__construct()
- HtmlOutputFormatter::__construct in vendor/
composer/ composer/ src/ Composer/ Console/ HtmlOutputFormatter.php
File
-
vendor/
symfony/ console/ Formatter/ OutputFormatter.php, line 69
Class
- OutputFormatter
- Formatter class for console output.
Namespace
Symfony\Component\Console\FormatterCode
public function __construct(bool $decorated = false, array $styles = []) {
$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();
}