PHP Interface PhpSchool\CliMenu\Terminal\TerminalInterface

Author: Michael Woodward ([email protected])
Afficher le fichier Open project: php-school/cli-menu Interface Usage Examples

Méthodes publiques

Méthode Description
clean ( ) : void Clean the whole console without jumping the window
clear ( ) : void Clear the terminal window
clearLine ( ) : void Clear the current cursors line
disableCursor ( ) Disable cursor display
enableCursor ( ) Enable cursor display
getDetails ( ) : string Get terminal details
getHeight ( ) : integer Get the available height of the terminal
getKeyedInput ( ) : string
getWidth ( ) : integer Get the available width of the terminal
isCanonical ( ) : boolean Check if TTY is in canonical mode
isTTY ( ) : boolean Test whether terminal is valid TTY
moveCursorToColumn ( integer $columnNumber ) Move the cursor to a specific column
moveCursorToRow ( integer $rowNumber ) Move the cursor to the start of a specific row
moveCursorToTop ( ) : void Move the cursor to the top left of the window
setCanonicalMode ( boolean $useCanonicalMode = true ) Toggle canonical mode on TTY
supportsColour ( ) : boolean Test whether terminal supports colour output

Method Details

clean() public méthode

Clean the whole console without jumping the window
public clean ( ) : void
Résultat void

clear() public méthode

Clear the terminal window
public clear ( ) : void
Résultat void

clearLine() public méthode

Clear the current cursors line
public clearLine ( ) : void
Résultat void

disableCursor() public méthode

Disable cursor display
public disableCursor ( )

enableCursor() public méthode

Enable cursor display
public enableCursor ( )

getDetails() public méthode

Get terminal details
public getDetails ( ) : string
Résultat string

getHeight() public méthode

Get the available height of the terminal
public getHeight ( ) : integer
Résultat integer

getKeyedInput() public méthode

public getKeyedInput ( ) : string
Résultat string

getWidth() public méthode

Get the available width of the terminal
public getWidth ( ) : integer
Résultat integer

isCanonical() public méthode

Check if TTY is in canonical mode
public isCanonical ( ) : boolean
Résultat boolean

isTTY() public méthode

Test whether terminal is valid TTY
public isTTY ( ) : boolean
Résultat boolean

moveCursorToColumn() public méthode

Move the cursor to a specific column
public moveCursorToColumn ( integer $columnNumber )
$columnNumber integer

moveCursorToRow() public méthode

Move the cursor to the start of a specific row
public moveCursorToRow ( integer $rowNumber )
$rowNumber integer

moveCursorToTop() public méthode

Move the cursor to the top left of the window
public moveCursorToTop ( ) : void
Résultat void

setCanonicalMode() public méthode

Toggle canonical mode on TTY
public setCanonicalMode ( boolean $useCanonicalMode = true )
$useCanonicalMode boolean

supportsColour() public méthode

Test whether terminal supports colour output
public supportsColour ( ) : boolean
Résultat boolean