PHP Interface PhpSchool\CliMenu\Terminal\TerminalInterface

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

Public Methods

Method 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 method

Clean the whole console without jumping the window
public clean ( ) : void
return void

clear() public method

Clear the terminal window
public clear ( ) : void
return void

clearLine() public method

Clear the current cursors line
public clearLine ( ) : void
return void

disableCursor() public method

Disable cursor display
public disableCursor ( )

enableCursor() public method

Enable cursor display
public enableCursor ( )

getDetails() public method

Get terminal details
public getDetails ( ) : string
return string

getHeight() public method

Get the available height of the terminal
public getHeight ( ) : integer
return integer

getKeyedInput() public method

public getKeyedInput ( ) : string
return string

getWidth() public method

Get the available width of the terminal
public getWidth ( ) : integer
return integer

isCanonical() public method

Check if TTY is in canonical mode
public isCanonical ( ) : boolean
return boolean

isTTY() public method

Test whether terminal is valid TTY
public isTTY ( ) : boolean
return boolean

moveCursorToColumn() public method

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

moveCursorToRow() public method

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

moveCursorToTop() public method

Move the cursor to the top left of the window
public moveCursorToTop ( ) : void
return void

setCanonicalMode() public method

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

supportsColour() public method

Test whether terminal supports colour output
public supportsColour ( ) : boolean
return boolean