Tty

Provide interactions with the Shell TTY.

package

Default

Methods

__construct

__construct() 

height

height() : integer

Response

integer

the current height, i.e the number of columns or {@literal -1} if unknown

Set a resize handler, the handler is called when the tty size changes.

resizehandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this object

Set a stream handler on the standard input to read the data.

stdinHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this object

type

type() : string

Response

string

the declared tty type, for instance {@literal vt100}, {@literal xterm-256}, etc... it can be null when the tty does not have declared its type.

width

width() : integer

Response

integer

the current width, i.e the number of rows or {@literal -1} if unknown

Write data to the standard output.

write( $arg0) : $this

Arguments

$arg0

string

Response

$this

this object