| Methods |
public
static
|
run(string $line, boolean $captureOutput = false): boolean|string
Runs a command.
Parameters
| $line |
The command to run.
|
| $captureOutput |
Weather to return the recorded echo's or not.
|
Returns
If captureOutput is false, a boolean indicating succcess will be returned, otherwise a string will be returned.
|
#
|
public
static
|
registerAlias(string $alias, string $command): boolean
Registers a command alias, this allows you to map a command to a longer one.
Registers a command alias, this allows you to map a command to a longer one.
Parameters
| $alias |
The nickname for the command.
|
| $command |
The command the alias gets replaced with.
|
Returns
|
#
|
public
static
|
version(): integer
Returns the version number of PHP-CLI.
Returns the version number of PHP-CLI.
Returns
The current PHP-CLI version number.
|
#
|
public
static
|
info(): array
Gets general info about the PHP-CLI install and some system information.
Gets general info about the PHP-CLI install and some system information.
Returns
|
#
|
public
static
|
parseLine(string $line): array
Parses a command string into arguments, options and parameters.
Inputted "words" can be quoted with double-quotes to…
Parses a command string into arguments, options and parameters.
Inputted "words" can be quoted with double-quotes to stop spaces making it 2 words.
Arguments are strings on their own, options are preceded with a "-" and are added to the options list if they exist,
parameters are preceded with "--" and then take watever was behind them as the value, this is added to the params array and is keyed with the parameter name and has the parameter string value.
Parameters
| $line |
The line containing words.
|
Returns
The args, options, and params arrays.
|
#
|