public function StreamOutput::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Output/StreamOutput.php \Symfony\Component\Console\Output\StreamOutput::__construct()
Constructor.
Parameters
resource $stream A stream resource:
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):
Throws
\InvalidArgumentException When first argument is not a real stream
Overrides Output::__construct
1 call to StreamOutput::__construct()
- ConsoleOutput::__construct in vendor/
symfony/ console/ Output/ ConsoleOutput.php - Constructor.
1 method overrides StreamOutput::__construct()
- ConsoleOutput::__construct in vendor/
symfony/ console/ Output/ ConsoleOutput.php - Constructor.
File
- vendor/
symfony/ console/ Output/ StreamOutput.php, line 43
Class
- StreamOutput
- StreamOutput writes the output to a given stream.
Namespace
Symfony\Component\Console\OutputCode
public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) {
if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) {
throw new \InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
}
$this->stream = $stream;
if (null === $decorated) {
$decorated = $this
->hasColorSupport();
}
parent::__construct($verbosity, $decorated, $formatter);
}