Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
SimpleReadline Class Reference

Public Member Functions

 addHistory ($line)
 
 readHistory ($filename)
 
 setHistorySize ($c)
 
 readline ($prompt=null)
 
 registerAutocompleteCallback ($f)
 
 writeHistory ($filename)
 

Static Public Member Functions

static readKey ()
 

Detailed Description

Definition at line 786 of file matrixsqlclient.php.

Member Function Documentation

addHistory (   $line)

Adds a line to the command line history.

Parameters
string$lineLine to be added in the history.
Returns
bool Returns true on success or false on failure.

Definition at line 840 of file matrixsqlclient.php.

readHistory (   $filename)

Reads a command history from a file.

Parameters
string$filenamePath to the filename containing the command history.
Returns
boolean true on success or false on failure

Definition at line 852 of file matrixsqlclient.php.

static readKey ( )
static

Returns data from a keypress. This will either be a single character, or a set of control characters.

Returns
Returns a string containing a character or set of control characters.

Definition at line 1074 of file matrixsqlclient.php.

readline (   $prompt = null)

Reads a single line from the user.

Parameters
string$promptYou may specify a string with which to prompt the user.
Returns
Returns a single string from the user.

Definition at line 889 of file matrixsqlclient.php.

registerAutocompleteCallback (   $f)

Registers the function that will be called when TAB is pressed on the prompt: function takes one parameter, the "hint", and returns the extra text to be added to the current line

Parameters
callback$fcallback the function to call for autocompletion
Returns
void

Definition at line 1121 of file matrixsqlclient.php.

setHistorySize (   $c)

Sets the maximum number of history items that will be saved to file.

Parameters
integer$cMaximum number of history items to save to file.
Returns
true on success or false on failure

Definition at line 872 of file matrixsqlclient.php.

writeHistory (   $filename)

Writes the command history to a file.

Parameters
string$filenamePath to the saved file.
Returns
boolean true on success or false on failure

Definition at line 1133 of file matrixsqlclient.php.


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