Copied!
CloneableInstantiable
Constants
public Symfony\Component\Console\Output\OutputInterface::OUTPUT_NORMAL = 1
public Symfony\Component\Console\Output\OutputInterface::OUTPUT_PLAIN = 4
public Symfony\Component\Console\Output\OutputInterface::OUTPUT_RAW = 2
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_DEBUG = 256
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL = 32
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_QUIET = 16
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERBOSE = 64
public Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERY_VERBOSE = 128
Methods
public __construct( $stream, array $sections, int $verbosity, bool $decorated, Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter)
 
  • param resource $stream
  • param \ConsoleSectionOutput[] $sections
public addContent(string $input, bool $newline = true) : int
 
  • internal
public addNewLineOfInputSubmit() : void
 
  • internal
public clear(?int $lines = NULL)
 

Clears previous output for this section.

  • param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
  • return void
public getContent() : string
public Symfony\Component\Console\Output\Output::getFormatter() : Symfony\Component\Console\Formatter\OutputFormatterInterface
public Symfony\Component\Console\Output\StreamOutput::getStream()
 

Gets the stream attached to this StreamOutput instance.

  • return resource
public Symfony\Component\Console\Output\Output::getVerbosity() : int
public getVisibleContent() : string
public Symfony\Component\Console\Output\Output::isDebug() : bool
public Symfony\Component\Console\Output\Output::isDecorated() : bool
public Symfony\Component\Console\Output\Output::isQuiet() : bool
public Symfony\Component\Console\Output\Output::isVerbose() : bool
public Symfony\Component\Console\Output\Output::isVeryVerbose() : bool
public overwrite(Traversable|array|string $message)
 

Overwrites the previous output with a new message.

  • return void
public Symfony\Component\Console\Output\Output::setDecorated(bool $decorated)
 
  • return void
public Symfony\Component\Console\Output\Output::setFormatter(Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter)
 
  • return void
public setMaxHeight(int $maxHeight) : void
 

Defines a maximum number of lines for this section.

When more lines are added, the section will automatically scroll to the
end (i.e. remove the first lines to comply with the max height).

public Symfony\Component\Console\Output\Output::setVerbosity(int $level)
 
  • return void
public Symfony\Component\Console\Output\Output::write(Traversable|array|string $messages, bool $newline = false, int $options = 1self::OUTPUT_NORMAL)
 
  • return void
public Symfony\Component\Console\Output\Output::writeln(Traversable|array|string $messages, int $options = 1self::OUTPUT_NORMAL)
 
  • return void
Methods
protected doWrite(string $message, bool $newline)
 
  • return void
protected Symfony\Component\Console\Output\StreamOutput::hasColorSupport() : bool
 

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
Properties
private array $content = []
private int $lines = 0
private int $maxHeight = 0
private array $sections
private Symfony\Component\Console\Terminal $terminal
Methods
private getDisplayLength(string $text) : int
private popStreamContentUntilCurrentSection(int $numberOfLinesToClearFromCurrentSection = 0) : string
 

At initial stage, cursor is at the end of stream output. This method makes cursor crawl upwards until it hits
current section. Then it erases content it crawled through. Optionally, it erases part of current section too.

© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration