[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/symfony/console/Output/ -> StreamOutput.php (summary)

(no description)

File Size: 115 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

StreamOutput:: (4 methods):
  __construct()
  getStream()
  doWrite()
  hasColorSupport()


Class: StreamOutput  - X-Ref

StreamOutput writes the output to a given stream.

Usage:

$output = new StreamOutput(fopen('php://stdout', 'w'));

As `StreamOutput` can use any stream, you can also use a file:

$output = new StreamOutput(fopen('/path/to/output.log', 'a', false));

__construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null)   X-Ref

param: resource                      $stream    A stream resource
param: int                           $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
param: bool|null                     $decorated Whether to decorate messages (null for auto-guessing)
param: OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)

getStream()   X-Ref
Gets the stream attached to this StreamOutput instance.

return: resource

doWrite(string $message, bool $newline)   X-Ref
{@inheritdoc}


hasColorSupport()   X-Ref
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

return: bool true if the stream supports colorization, false otherwise



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer