ANSI
Pure-PHP ANSI Decoder
- Full name:
\phpseclib\File\ANSI
Properties
max_x
Max Width
max_y
Max Height
max_history
Max History
history
History
history_attrs
History Attributes
x
Current Column
y
Current Row
old_x
Old Column
old_y
Old Row
base_attr_cell
An empty attribute cell
attr_cell
The current attribute cell
attr_row
An empty attribute row
screen
The current screen text
attrs
The current screen attributes
ansi
Current ANSI code
tokenization
Tokenization
Methods
__construct
Default Constructor.
setDimensions
Set terminal width and height
Resets the screen as well
Parameters:
Parameter | Type | Description |
---|---|---|
$x |
int | |
$y |
int |
setHistory
Set the number of lines that should be logged past the terminal height
Parameters:
Parameter | Type | Description |
---|---|---|
$history |
int |
loadString
Load a string
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
string |
appendString
Appdend a string
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
string |
_newLine
Add a new line
Also update the $this->screen and $this->history buffers
_processCoordinate
Returns the current coordinate without preformating
Parameters:
Parameter | Type | Description |
---|---|---|
$last_attr |
mixed | |
$cur_attr |
mixed | |
$char |
mixed |
_getScreen
Returns the current screen without preformating
getScreen
Returns the current screen
getHistory
Returns the current screen and the x previous lines
Automatically generated on 2025-03-18