You are here

public function ConsoleOutput::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Output/ConsoleOutput.php \Symfony\Component\Console\Output\ConsoleOutput::__construct()

Constructor.

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 43

Class

ConsoleOutput
ConsoleOutput is the default class for all CLI output. It uses STDOUT.

Namespace

Symfony\Component\Console\Output

Code

public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) {
  parent::__construct($this
    ->openOutputStream(), $verbosity, $decorated, $formatter);
  $actualDecorated = $this
    ->isDecorated();
  $this->stderr = new StreamOutput($this
    ->openErrorStream(), $verbosity, $decorated, $this
    ->getFormatter());
  if (null === $decorated) {
    $this
      ->setDecorated($actualDecorated && $this->stderr
      ->isDecorated());
  }
}