$stream
$stream :
ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR.
This class is a convenient wrapper around StreamOutput
for both STDOUT and STDERR.
$output = new ConsoleOutput();
This is equivalent to:
$output = new StreamOutput(fopen('php://stdout', 'w'));
$stdErr = new StreamOutput(fopen('php://stderr', 'w'));
__construct(integer $verbosity = self::VERBOSITY_NORMAL, boolean|null $decorated = null, \Symfony\Component\Console\Formatter\OutputFormatterInterface|null $formatter = null)
integer | $verbosity | The verbosity level (one of the VERBOSITY constants in OutputInterface) |
boolean|null | $decorated | Whether to decorate messages (null for auto-guessing) |
\Symfony\Component\Console\Formatter\OutputFormatterInterface|null | $formatter | Output formatter instance (null to use default OutputFormatter) |
setFormatter(\Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter)
{@inheritdoc}
\Symfony\Component\Console\Formatter\OutputFormatterInterface | $formatter |
getErrorOutput() : \Symfony\Component\Console\Output\OutputInterface
Gets the OutputInterface for errors.
setErrorOutput(\Symfony\Component\Console\Output\OutputInterface $error)
\Symfony\Component\Console\Output\OutputInterface | $error |
hasColorSupport() : boolean
Returns true if the stream supports colorization.
Colorization is disabled if not supported by the stream:
This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo terminals via named pipes, so we can only check the environment.
Reference: Composer\XdebugHandler\Process::supportsColor https://github.com/composer/xdebug-handler
true if the stream supports colorization, false otherwise