\phpseclib\FileANSI

Pure-PHP ANSI Decoder

Summary

Methods
Properties
Constants
__construct()
setDimensions()
setHistory()
loadString()
appendString()
_newLine()
_processCoordinate()
_getScreen()
getScreen()
getHistory()
$max_x
$max_y
$max_history
$history
$history_attrs
$x
$y
$old_x
$old_y
$base_attr_cell
$attr_cell
$attr_row
$screen
$attrs
$ansi
$tokenization
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$max_x

$max_x : integer

Max Width

Type

integer

$max_y

$max_y : integer

Max Height

Type

integer

$max_history

$max_history : integer

Max History

Type

integer

$history

$history : array

History

Type

array

$history_attrs

$history_attrs : array

History Attributes

Type

array

$x

$x : integer

Current Column

Type

integer

$y

$y : integer

Current Row

Type

integer

$old_x

$old_x : integer

Old Column

Type

integer

$old_y

$old_y : integer

Old Row

Type

integer

$base_attr_cell

$base_attr_cell : object

An empty attribute cell

Type

object

$attr_cell

$attr_cell : object

The current attribute cell

Type

object

$attr_row

$attr_row : array

An empty attribute row

Type

array

$screen

$screen : array

The current screen text

Type

array

$attrs

$attrs : array

The current screen attributes

Type

array

$ansi

$ansi : string

Current ANSI code

Type

string

$tokenization

$tokenization : array

Tokenization

Type

array

Methods

__construct()

__construct() : \phpseclib\File\ANSI

Default Constructor.

Returns

\phpseclib\File\ANSI

setDimensions()

setDimensions(integer  $x, integer  $y) 

Set terminal width and height

Resets the screen as well

Parameters

integer $x
integer $y

setHistory()

setHistory(  $history) 

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

Parameters

$history

loadString()

loadString(string  $source) 

Load a string

Parameters

string $source

appendString()

appendString(string  $source) 

Appdend a string

Parameters

string $source

_newLine()

_newLine() 

Add a new line

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

_processCoordinate()

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

Returns the current coordinate without preformating

Parameters

$last_attr
$cur_attr
$char

Returns

string

_getScreen()

_getScreen() : string

Returns the current screen without preformating

Returns

string

getScreen()

getScreen() : string

Returns the current screen

Returns

string

getHistory()

getHistory() : string

Returns the current screen and the x previous lines

Returns

string