Command::getSynopsis()

string getSynopsis(bool $short = false) Returns the synopsis for the command. Parameters bool $short Whether to show the short version of the synopsis (with options folded) or not Return Value string The synopsis

Command::getName()

string getName() Returns the command name. Return Value string The command name

Command::getDefinition()

InputDefinition getDefinition() Gets the InputDefinition attached to this Command. Return Value InputDefinition An InputDefinition instance

Command::getDescription()

string getDescription() Returns the description for the command. Return Value string The description for the command

Command::getHelp()

string getHelp() Returns the help for the command. Return Value string The help for the command

Command::getHelper()

mixed getHelper(string $name) Gets a helper instance by name. Parameters string $name The helper name Return Value mixed The helper value Exceptions LogicException if no HelperSet is defined InvalidArgumentException if the helper is not defined

Command::getHelperSet()

HelperSet getHelperSet() Gets the helper set. Return Value HelperSet A HelperSet 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::getApplication()

Application getApplication() Gets the application instance for this command. Return Value Application An Application 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