Symfony\Component\Finder\Shell\Command
- Author: Jean-François Simon <contact@jfsimon.fr>
Synopsis
class Command
{
- // members
- private Command|null $parent;
- private array $bits;
- private array $labels;
- private Closure|null $errorHandler;
- // methods
- public void __construct()
- public string __toString()
- public static Command create()
- public static string escape()
- public static string quote()
- public Command add()
- public Command top()
- public Command arg()
- public Command cmd()
- public Command ins()
- public Command get()
- public Command end()
- public int length()
- public Command setErrorHandler()
- public callable|null getErrorHandler()
- public array execute()
- public string join()
- public Command addAtIndex()
Members
private
- $bits — array
- $errorHandler — \Closure|null
- $labels — array
- $parent — Symfony\Component\Finder\Shell\Command|null
Methods
public
- __construct() — Constructor.
- __toString() — Returns command as string.
- add() — Appends a string or a Command instance.
- addAtIndex() — Insert a string or a Command instance before the bit at given position $index (index starts from 0).
- arg() — Appends an argument, will be quoted.
- cmd() — Appends escaped special command chars.
- create() — Creates a new Command instance.
- end() — Returns parent command (if any).
- escape() — Escapes special chars from input.
- execute() — Executes current command.
- get() — Retrieves a previously labeled command.
- getErrorHandler()
- ins() — Inserts a labeled command to feed later.
- join() — Joins bits.
- length() — Counts bits stored in command.
- quote() — Quotes input.
- setErrorHandler()
- top() — Prepends a string or a command instance.