phpseclib API Documentation
Class

File_ANSI

class File_ANSI

Pure-PHP ANSI Decoder

Properties

int $max_x Max Width
int $max_y Max Height
int $max_history Max History
array $history History
array $history_attrs History Attributes
int $x Current Column
int $y Current Row
int $old_x Old Column
int $old_y Old Row
object $base_attr_cell An empty attribute cell
object $attr_cell The current attribute cell
array $attr_row An empty attribute row
array $screen The current screen text
array $attrs The current screen attributes
string $ansi Current ANSI code
array $tokenization Tokenization

Methods

File_ANSI File_ANSI()

Default Constructor.

setDimensions(int $x, int $y)

Set terminal width and height

setHistory($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

_newLine()

Add a new line

string _processCoordinate($last_attr, $cur_attr, $char)

Returns the current coordinate without preformating

string _getScreen()

Returns the current screen without preformating

string getScreen()

Returns the current screen

string getHistory()

Returns the current screen and the x previous lines

Details

at line 182
public File_ANSI File_ANSI()

Default Constructor.

Return Value

File_ANSI

at line 207
public setDimensions(int $x, int $y)

Set terminal width and height

Resets the screen as well

Parameters

int $x
int $y

at line 226
public setHistory($history)

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

Parameters

$history

at line 237
public loadString(string $source)

Load a string

Parameters

string $source

at line 249
public appendString(string $source)

Appdend a string

Parameters

string $source

at line 450
public _newLine()

Add a new line

Also update the $this->screen and $this->history buffers

at line 479
public string _processCoordinate($last_attr, $cur_attr, $char)

Returns the current coordinate without preformating

Parameters

$last_attr
$cur_attr
$char

Return Value

string

at line 536
public string _getScreen()

Returns the current screen without preformating

Return Value

string

at line 560
public string getScreen()

Returns the current screen

Return Value

string

at line 571
public string getHistory()

Returns the current screen and the x previous lines

Return Value

string