class ANSI (View source)

Pure-PHP ANSI Decoder

Methods

__construct()

Default Constructor.

setDimensions(int $x, int $y)

Set terminal width and height

setHistory(int $history)

Set the number of lines that should be logged past the terminal height

loadString(string $source)

Load a string

appendString(string $source)

Appdend a string

string
getScreen()

Returns the current screen

string
getHistory()

Returns the current screen and the x previous lines

Details

ANSI __construct()

Default Constructor.

Return Value

ANSI

setDimensions(int $x, int $y)

Set terminal width and height

Resets the screen as well

Parameters

int $x
int $y

setHistory(int $history)

Set the number of lines that should be logged past the terminal height

Parameters

int $history

loadString(string $source)

Load a string

Parameters

string $source

appendString(string $source)

Appdend a string

Parameters

string $source

string getScreen()

Returns the current screen

Return Value

string

string getHistory()

Returns the current screen and the x previous lines

Return Value

string