PHP Класс PhpSchool\CliMenu\Terminal\UnixTerminal

Автор: Michael Woodward ([email protected])
Наследование: implements PhpSchool\CliMenu\Terminal\TerminalInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ) Initialise the terminal from resource
clean ( ) Clean the whole console without jumping the window
clear ( ) Clear the terminal window
clearLine ( ) : void Clear the current cursors line
disableCursor ( ) Disable cursor
enableCursor ( ) Enable cursor
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 Assumes the terminal was never in canonical mode
isTTY ( ) : boolean Test whether terminal is valid TTY
moveCursorToColumn ( integer $column ) Move the cursor to the start of 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

Приватные методы

Метод Описание
getOriginalConfiguration ( ) : string Get the original terminal configuration / mode

Описание методов

__construct() публичный метод

Initialise the terminal from resource
public __construct ( )

clean() публичный метод

Clean the whole console without jumping the window
public clean ( )

clear() публичный метод

Clear the terminal window
public clear ( )

clearLine() публичный метод

Clear the current cursors line
public clearLine ( ) : void
Результат void

disableCursor() публичный метод

Disable cursor
public disableCursor ( )

enableCursor() публичный метод

Enable cursor
public enableCursor ( )

getDetails() публичный метод

Get terminal details
public getDetails ( ) : string
Результат string

getHeight() публичный метод

Get the available height of the terminal
public getHeight ( ) : integer
Результат integer

getKeyedInput() публичный метод

public getKeyedInput ( ) : string
Результат string

getWidth() публичный метод

Get the available width of the terminal
public getWidth ( ) : integer
Результат integer

isCanonical() публичный метод

Check if TTY is in canonical mode Assumes the terminal was never in canonical mode
public isCanonical ( ) : boolean
Результат boolean

isTTY() публичный метод

Test whether terminal is valid TTY
public isTTY ( ) : boolean
Результат boolean

moveCursorToColumn() публичный метод

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

moveCursorToRow() публичный метод

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

moveCursorToTop() публичный метод

Move the cursor to the top left of the window
public moveCursorToTop ( ) : void
Результат void

setCanonicalMode() публичный метод

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

supportsColour() публичный метод

Test whether terminal supports colour output
public supportsColour ( ) : boolean
Результат boolean