Text UI
A simple and fast way to take user input and display output in text mode using PHP.
Loading...
Searching...
No Matches
Command Class Reference

Static Public Member Functions

static send (string $command)
 

Data Fields

const string CLEAR_SCREEN = "\x1b[H\x1b[2J"
 
const string CLEAR_LINE = "\x1b[2K"
 
const string GOTO_LINE_START = "\r"
 

Detailed Description

Sends ANSI commands to the terminal.

Author
Everton

Definition at line 10 of file Command.php.

Member Function Documentation

◆ send()

static send ( string $command)
static

Sends an ANSI command to the terminal.

Parameters
string$commandThe ANSI command, including ESC[, to be sent to the terminal.
Returns
void

Definition at line 34 of file Command.php.

Field Documentation

◆ CLEAR_LINE

const string CLEAR_LINE = "\x1b[2K"

Deletes the entire line.

Definition at line 20 of file Command.php.

◆ CLEAR_SCREEN

const string CLEAR_SCREEN = "\x1b[H\x1b[2J"

Clear screen.

Definition at line 15 of file Command.php.

◆ GOTO_LINE_START

const string GOTO_LINE_START = "\r"

Moves the cursor to the beginning of the line.

Definition at line 25 of file Command.php.


The documentation for this class was generated from the following file: