Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
Screen Class Reference

Static Public Member Functions

static getWidth ()
 Gets the terminal width.
 
static getHeight ()
 Gets the terminal height.
 
static hasSttyAvailable ()
 

Static Private Member Functions

static initDimensions ()
 
static hasVt100Support ()
 Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
 
static initDimensionsUsingStty ()
 Initializes dimensions using the output of an stty columns line.
 
static getConsoleMode ()
 Runs and parses mode CON if it's available, suppressing any error output.
 
static getSttyColumns ()
 Runs and parses stty -a if it's available, suppressing any error output.
 
static readFromProcess (string $command)
 

Static Private Attributes

static $width
 
static $height
 
static $stty
 

Detailed Description

Definition at line 10 of file Screen.php.

Member Function Documentation

◆ getConsoleMode()

static getConsoleMode ( )
staticprivate

Runs and parses mode CON if it's available, suppressing any error output.

Returns
int[]|null An array composed of the width and the height or null if it could not be parsed

Definition at line 125 of file Screen.php.

◆ getHeight()

static getHeight ( )
static

Gets the terminal height.

Returns
int

Definition at line 41 of file Screen.php.

◆ getSttyColumns()

static getSttyColumns ( )
staticprivate

Runs and parses stty -a if it's available, suppressing any error output.

Definition at line 141 of file Screen.php.

◆ getWidth()

static getWidth ( )
static

Gets the terminal width.

Returns
int

Definition at line 23 of file Screen.php.

◆ hasSttyAvailable()

static hasSttyAvailable ( )
static

Definition at line 60 of file Screen.php.

◆ hasVt100Support()

static hasVt100Support ( )
staticprivate

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

Definition at line 99 of file Screen.php.

◆ initDimensions()

static initDimensions ( )
staticprivate

Definition at line 75 of file Screen.php.

◆ initDimensionsUsingStty()

static initDimensionsUsingStty ( )
staticprivate

Initializes dimensions using the output of an stty columns line.

Definition at line 106 of file Screen.php.

◆ readFromProcess()

static readFromProcess ( string  $command)
staticprivate

Definition at line 145 of file Screen.php.

Field Documentation

◆ $height

$height
staticprivate

Definition at line 14 of file Screen.php.

◆ $stty

$stty
staticprivate

Definition at line 16 of file Screen.php.

◆ $width

$width
staticprivate

Definition at line 12 of file Screen.php.


The documentation for this class was generated from the following file: