Documentation

Terminal
in package

Table of Contents

Properties

$height  : mixed
$stty  : mixed
$width  : mixed

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

Methods

getHeight()

Gets the terminal height.

public getHeight() : int
Return values
int

getWidth()

Gets the terminal width.

public getWidth() : int
Return values
int

getConsoleMode()

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|null

hasVt100Support()

Returns whether STDOUT has vt100 support (some Windows 10+ configurations).

private static hasVt100Support() : bool
Return values
bool

initDimensions()

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
Return values
string|null

        
On this page

Search results