class Command
deprecated
since 2.8, to be removed in 3.0.
Methods
__construct(Command $parent = null) Constructor. | ||
string | __toString() Returns command as string. | |
static Command | create(Command $parent = null) Creates a new Command instance. | |
static string | escape(string $input) Escapes special chars from input. | |
static string | quote(string $input) Quotes input. | |
Command | add(string|Command $bit) Appends a string or a Command instance. | |
Command | top(string|Command $bit) Prepends a string or a command instance. | |
Command | arg(string $arg) Appends an argument, will be quoted. | |
Command | cmd(string $esc) Appends escaped special command chars. | |
Command | ins(string $label) Inserts a labeled command to feed later. | |
Command | get(string $label) Retrieves a previously labeled command. | |
Command | end() Returns parent command (if any). | |
int | length() Counts bits stored in command. | |
Command | setErrorHandler(Closure $errorHandler) | |
Closure|null | getErrorHandler() | |
array | execute() Executes current command. | |
string | join() Joins bits. | |
Command | addAtIndex(string|Command $bit, int $index) Insert a string or a Command instance before the bit at given position $index (index starts from 0). |
Details
__construct(Command $parent = null)
Constructor.
string __toString()
Returns command as string.
static string escape(string $input)
Escapes special chars from input.
static string quote(string $input)
Quotes input.
Command arg(string $arg)
Appends an argument, will be quoted.
Command cmd(string $esc)
Appends escaped special command chars.
Command ins(string $label)
Inserts a labeled command to feed later.
Command get(string $label)
Retrieves a previously labeled command.
Command end()
Returns parent command (if any).
int length()
Counts bits stored in command.
Closure|null getErrorHandler()
array execute()
Executes current command.
string join()
Joins bits.
Please login to continue.