HoaConsole
in package
implements
Readline
Hoa\Console Readline implementation.
Interfaces, Classes and Traits
- Readline
- An interface abstracting the various readline_* functions.
Table of Contents
- $hoaReadline : Readline
- __construct() : mixed
- addHistory() : bool
- Add a line to the command history.
- clearHistory() : bool
- Clear the command history.
- isSupported() : bool
- Check whether this Readline class is supported by the current system.
- listHistory() : array<string|int, mixed>
- List the command history.
- readHistory() : bool
- Read the command history.
- readline() : string
- Read a single line of input from the user.
- redisplay() : mixed
- Redraw readline to redraw the display.
- writeHistory() : bool
- Write the command history to a file.
Properties
$hoaReadline
private
Readline
$hoaReadline
Methods
__construct()
public
__construct() : mixed
Return values
mixed —addHistory()
Add a line to the command history.
public
addHistory(mixed $line) : bool
Parameters
- $line : mixed
Return values
bool —Success
clearHistory()
Clear the command history.
public
clearHistory() : bool
Return values
bool —Success
isSupported()
Check whether this Readline class is supported by the current system.
public
static isSupported() : bool
Return values
bool —listHistory()
List the command history.
public
listHistory() : array<string|int, mixed>
Return values
array<string|int, mixed> —readHistory()
Read the command history.
public
readHistory() : bool
Return values
bool —Success
readline()
Read a single line of input from the user.
public
readline([mixed $prompt = null ]) : string
Parameters
- $prompt : mixed = null
Tags
Return values
string —redisplay()
Redraw readline to redraw the display.
public
redisplay() : mixed
Return values
mixed —writeHistory()
Write the command history to a file.
public
writeHistory() : bool
Return values
bool —Success