Terminal
in package
Table of Contents
Properties
Methods
- getHeight() : int
- Gets the terminal height.
- getWidth() : int
- Gets the terminal width.
- getConsoleMode() : array<string|int, int>|null
- Runs and parses mode CON if it's available, suppressing any error output.
- getSttyColumns() : string|null
- Runs and parses stty -a if it's available, suppressing any error output.
- hasVt100Support() : bool
- Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
- initDimensions() : mixed
- initDimensionsUsingStty() : mixed
- Initializes dimensions using the output of an stty columns line.
- readFromProcess() : string|null
Properties
$height
private
static mixed
$height
$stty
private
static mixed
$stty
$width
private
static mixed
$width
Methods
getHeight()
Gets the terminal height.
public
getHeight() : int
Return values
intgetWidth()
Gets the terminal width.
public
getWidth() : int
Return values
intgetConsoleMode()
Runs and parses mode CON if it's available, suppressing any error output.
private
static getConsoleMode() : array<string|int, int>|null
Return values
array<string|int, int>|null —An array composed of the width and the height or null if it could not be parsed
getSttyColumns()
Runs and parses stty -a if it's available, suppressing any error output.
private
static getSttyColumns() : string|null
Return values
string|nullhasVt100Support()
Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
private
static hasVt100Support() : bool
Return values
boolinitDimensions()
private
static initDimensions() : mixed
initDimensionsUsingStty()
Initializes dimensions using the output of an stty columns line.
private
static initDimensionsUsingStty() : mixed
readFromProcess()
private
static readFromProcess(string $command) : string|null
Parameters
- $command : string