Transient
in package
implements
Readline
An array-based Readline emulation implementation.
Interfaces, Classes and Traits
- Readline
- An interface abstracting the various readline_* functions.
Table of Contents
- $eraseDups : mixed
- $history : mixed
- $historySize : mixed
- $stdin : mixed
- __construct() : mixed
- Transient Readline constructor.
- addHistory() : bool
- Add a line to the command history.
- clearHistory() : bool
- Clear the command history.
- isSupported() : bool
- Transient Readline is always supported.
- 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.
- getStdin() : resource
- Get a STDIN file handle.
Properties
$eraseDups
private
mixed
$eraseDups
$history
private
mixed
$history
$historySize
private
mixed
$historySize
$stdin
private
mixed
$stdin
Methods
__construct()
Transient Readline constructor.
public
__construct([mixed $historyFile = null ], mixed $historySize[, mixed $eraseDups = false ]) : mixed
Parameters
- $historyFile : mixed = null
- $historySize : mixed
- $eraseDups : mixed = false
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()
Transient Readline is always supported.
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
getStdin()
Get a STDIN file handle.
private
getStdin() : resource