Command::getName()

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

Command::getNativeDefinition()

InputDefinition getNativeDefinition() Gets the InputDefinition to be used to create representations of this Command. Can be overridden to provide the original command representation when it would otherwise be changed by merging with the application InputDefinition. This method is not part of public API and should not be used directly. Return Value InputDefinition An InputDefinition instance

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::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::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::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::getAliases()

array getAliases() Returns the aliases for the command. Return Value array An array of aliases for the command