You are here

public function Output::__construct in Zircon Profile 8

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

Constructor.

Parameters

int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface):

bool $decorated Whether to decorate messages:

OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter):

1 call to Output::__construct()
StreamOutput::__construct in vendor/symfony/console/Output/StreamOutput.php
Constructor.
1 method overrides Output::__construct()
StreamOutput::__construct in vendor/symfony/console/Output/StreamOutput.php
Constructor.

File

vendor/symfony/console/Output/Output.php, line 42

Class

Output
Base class for output classes.

Namespace

Symfony\Component\Console\Output

Code

public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = false, OutputFormatterInterface $formatter = null) {
  $this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity;
  $this->formatter = $formatter ?: new OutputFormatter();
  $this->formatter
    ->setDecorated($decorated);
}