Shell\Command (Component\Finder)
Symfony\Component\Finder\Shell\Command
class Command
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
public __construct(Command $parent = null)
Constructor.
public string __toString()
Returns command as string.
static public Command create(Command $parent = null)
Creates a new Command instance.
static public string escape(string $input)
Escapes special chars from input.
static public string quote(string $input)
Quotes input.
public Command add(string|Command $bit)
Appends a string or a Command instance.
public Command top(string|Command $bit)
Prepends a string or a command instance.
public Command arg(string $arg)
Appends an argument, will be quoted.
public Command cmd(string $esc)
Appends escaped special command chars.
public Command ins(string $label)
Inserts a labeled command to feed later.
public Command get(string $label)
Retrieves a previously labeled command.
public Command end()
Returns parent command (if any).
public int length()
Counts bits stored in command.
public Command setErrorHandler(Closure $errorHandler)
public Closure|null getErrorHandler()
public array execute()
Executes current command.
public string join()
Joins bits.
public 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).
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Finder/Shell/Command.html