ANSI

Pure-PHP ANSI Decoder

author

Jim Wigginton terrafrost@php.net

package

Default

Methods

Default Constructor.

__construct(): \phpseclib3\File\ANSI

Appdend a string

appendString(string $source)

Arguments

$source

string

Returns the current screen and the x previous lines

getHistory(): string

Response

string

Returns the current screen

getScreen(): string

Response

string

Returns the current screen without preformating

getScreenHelper(): string

Response

string

Load a string

loadString(string $source)

Arguments

$source

string

Add a new line

newLine()

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

Returns the current coordinate without preformating

processCoordinate(\stdClass $last_attr,\stdClass $cur_attr,string $char): string

Arguments

$last_attr

\stdClass

$cur_attr

\stdClass

$char

string

Response

string

Set terminal width and height

setDimensions(integer $x,integer $y)

Resets the screen as well

Arguments

$x

integer

$y

integer

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

setHistory(integer $history)

Arguments

$history

integer

Properties

Max Width

max_x :integer
var

Type(s)

integer

Max Height

max_y :integer
var

Type(s)

integer

Max History

max_history :integer
var

Type(s)

integer

History

history :array
var

Type(s)

array

History Attributes

history_attrs :array
var

Type(s)

array

Current Column

x :integer
var

Type(s)

integer

Current Row

y :integer
var

Type(s)

integer

Old Column

old_x :integer
var

Type(s)

integer

Old Row

old_y :integer
var

Type(s)

integer

An empty attribute cell

base_attr_cell :object
var

Type(s)

object

The current attribute cell

attr_cell :object
var

Type(s)

object

An empty attribute row

attr_row :array
var

Type(s)

array

The current screen text

screen :\phpseclib3\File\list<string>
var

Type(s)

\phpseclib3\File\list

The current screen attributes

attrs :array
var

Type(s)

array

Current ANSI code

ansi :string
var

Type(s)

string

Tokenization

tokenization :array
var

Type(s)

array