function StreamOutput::__construct
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
4 calls to StreamOutput::__construct()
- ConsoleOutput::__construct in vendor/
symfony/ console/ Output/ ConsoleOutput.php - ConsoleOutput::__construct in vendor/
symfony/ console/ Output/ ConsoleOutput.php - ConsoleSectionOutput::__construct in vendor/
symfony/ console/ Output/ ConsoleSectionOutput.php - ConsoleSectionOutput::__construct in vendor/
symfony/ console/ Output/ ConsoleSectionOutput.php
2 methods override StreamOutput::__construct()
- ConsoleOutput::__construct in vendor/
symfony/ console/ Output/ ConsoleOutput.php - ConsoleSectionOutput::__construct in vendor/
symfony/ console/ Output/ ConsoleSectionOutput.php
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, int $verbosity = self::VERBOSITY_NORMAL, ?bool $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;
$decorated ??= $this->hasColorSupport();
parent::__construct($verbosity, $decorated, $formatter);
}