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 __construct()

Default Constructor.

File_ANSI()

PHP4 compatible 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 __construct()

Default Constructor.

Return Value

File_ANSI

at line 204
public File_ANSI()

PHP4 compatible Default Constructor.

See also

self::__construct()

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

Set terminal width and height

Resets the screen as well

Parameters

int $x
int $y

at line 237
public setHistory($history)

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

Parameters

$history

at line 248
public loadString(string $source)

Load a string

Parameters

string $source

at line 260
public appendString(string $source)

Appdend a string

Parameters

string $source

at line 464
public _newLine()

Add a new line

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

at line 493
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 550
public string _getScreen()

Returns the current screen without preformating

Return Value

string

at line 574
public string getScreen()

Returns the current screen

Return Value

string

at line 585
public string getHistory()

Returns the current screen and the x previous lines

Return Value

string