Command::addOption()

Command addOption(string $name, string $shortcut = null, int $mode = null, string $description = '', mixed $default = null) Adds an option. Parameters string $name The option name string $shortcut The shortcut (can be null) int $mode The option mode: One of the InputOption::VALUE_* constants string $description A description text mixed $default The default value (must be null for InputOption::VALUE_NONE) Return Value Command The current instance

Command::addArgument()

Command addArgument(string $name, int $mode = null, string $description = '', mixed $default = null) Adds an argument. Parameters string $name The argument name int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL string $description A description text mixed $default The default value (for InputArgument::OPTIONAL mode only) Return Value Command The current instance

Command deprecated::top()

Command top(string|Command $bit) Prepends a string or a command instance. Parameters string|Command $bit Return Value Command The current Command instance

Command deprecated::setErrorHandler()

Command setErrorHandler(Closure $errorHandler) Parameters Closure $errorHandler Return Value Command

Command deprecated::quote()

static string quote(string $input) Quotes input. Parameters string $input An argument string Return Value string The quoted string

Command deprecated::length()

int length() Counts bits stored in command. Return Value int The bits count

Command deprecated::join()

string join() Joins bits. Return Value string

Command deprecated::ins()

Command ins(string $label) Inserts a labeled command to feed later. Parameters string $label The unique label Return Value Command The current Command instance Exceptions RuntimeException If label already exists

Command deprecated::getErrorHandler()

Closure|null getErrorHandler() Return Value Closure|null

Command deprecated::execute()

array execute() Executes current command. Return Value array The command result Exceptions RuntimeException