| Methods |
public
static
|
getColorMode(): AnsiColorMode
About Ansi color types: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
For more information about true color…
|
#
|
public
static
|
setColorMode(?AnsiColorMode $colorMode): void
Force a terminal color mode rendering.
Force a terminal color mode rendering.
|
#
|
public
|
getWidth(): int
Gets the terminal width.
|
#
|
public
|
getHeight(): int
Gets the terminal height.
Gets the terminal height.
|
#
|
private
static
|
initDimensions(): void
|
#
|
private
static
|
hasVt100Support(): bool
Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
|
#
|
private
static
|
initDimensionsUsingStty(): void
Initializes dimensions using the output of an stty columns line.
Initializes dimensions using the output of an stty columns line.
|
#
|
private
static
|
getConsoleMode(): int[]|null
Runs and parses mode CON if it's available, suppressing any error output.
Runs and parses mode CON if it's available, suppressing any error output.
Returns
An array composed of the width and the height or null if it could not be parsed
|
#
|
private
static
|
getSttyColumns(): ?string
Runs and parses stty -a if it's available, suppressing any error output.
Runs and parses stty -a if it's available, suppressing any error output.
|
#
|
private
static
|
readFromProcess(string|array $command): ?string
|
#
|