function ConsoleOutput::__construct
Parameters
int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface):
bool|null $decorated Whether to decorate messages (null for auto-guessing):
OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter):
Overrides StreamOutput::__construct
File
-
vendor/
symfony/ console/ Output/ ConsoleOutput.php, line 40
Class
- ConsoleOutput
- ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR.
Namespace
Symfony\Component\Console\OutputCode
public function __construct(int $verbosity = self::VERBOSITY_NORMAL, ?bool $decorated = null, ?OutputFormatterInterface $formatter = null) {
parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter);
if (null === $formatter) {
// for BC reasons, stdErr has it own Formatter only when user don't inject a specific formatter.
$this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated);
return;
}
$actualDecorated = $this->isDecorated();
$this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated, $this->getFormatter());
if (null === $decorated) {
$this->setDecorated($actualDecorated && $this->stderr
->isDecorated());
}
}