Méthode | Description | |
---|---|---|
__construct ( |
Creates a new command. | |
getAliases ( ) : string[] | Returns the alias names of the command. | |
getApplication ( ) : Webmozart\Console\Api\Application\Application | Returns the console application. | |
getArgsFormat ( ) : |
Returns the arguments format of the command. | |
getConfig ( ) : |
Returns the configuration of the command. | |
getDefaultSubCommands ( ) : |
Returns the commands that should be executed if no explicit command is passed. | |
getName ( ) : string | Returns the name of the command. | |
getNamedSubCommands ( ) : |
Returns all sub-commands that are not anonymous. | |
getParentCommand ( ) : |
Returns the parent command. | |
getShortName ( ) : string | null | Returns the short name of the command. | |
getSubCommand ( string $name ) : |
Returns the sub-command with a specific name. | |
getSubCommands ( ) : |
Returns all sub-commands of the command. | |
handle ( |
Executes the command for the given parsed arguments. | |
hasAliases ( ) : boolean | Returns whether the command has aliases. | |
hasDefaultSubCommands ( ) : boolean | Returns whether the command has any default commands. | |
hasNamedSubCommands ( ) : boolean | Returns whether the command has any commands that are not anonymous. | |
hasSubCommand ( string $name ) : boolean | Returns whether a sub-command with the given name exists. | |
hasSubCommands ( ) : boolean | Returns whether the command has any sub-commands. | |
parseArgs ( Webmozart\Console\Api\Args\RawArgs $args, boolean $lenient = null ) : |
Parses the raw console arguments and returns the parsed arguments. | |
run ( Webmozart\Console\Api\Args\RawArgs $args, |
Executes the command for the given unparsed arguments. |
Méthode | Description | |
---|---|---|
addSubCommand ( |
Adds a sub-command. | |
doHandle ( |
||
getBaseFormat ( ) : |
Returns the inherited arguments format of the command. | |
validateSubCommandName ( |
||
warnIfProcessTitleNotSupported ( $processTitle, |
public __construct ( |
||
$config | The command configuration. | |
$application | Webmozart\Console\Api\Application\Application | The console application. |
$parentCommand | The parent command. |
public getAliases ( ) : string[] | ||
Résultat | string[] | An array of alias names of the command. |
public getApplication ( ) : Webmozart\Console\Api\Application\Application | ||
Résultat | Webmozart\Console\Api\Application\Application | The console application. |
public getArgsFormat ( ) : |
||
Résultat | The input definition. |
public getConfig ( ) : |
||
Résultat | The command configuration. |
public getDefaultSubCommands ( ) : |
||
Résultat | The default commands. |
public getNamedSubCommands ( ) : |
||
Résultat | The named commands. |
public getParentCommand ( ) : |
||
Résultat | The parent command. |
public getShortName ( ) : string | null | ||
Résultat | string | null | The short name or `null` if the command is not an option command. |
public getSubCommand ( string $name ) : |
||
$name | string | The name of the sub-command. |
Résultat | The sub-command. |
public getSubCommands ( ) : |
||
Résultat | The sub-commands. |
public hasAliases ( ) : boolean | ||
Résultat | boolean | Returns `true` if the command has aliases and `false` otherwise. |
public hasDefaultSubCommands ( ) : boolean | ||
Résultat | boolean | Returns `true` if the command has default commands and `false` otherwise. |
public hasNamedSubCommands ( ) : boolean | ||
Résultat | boolean | Returns `true` if the command has named commands and `false` otherwise. |
public hasSubCommand ( string $name ) : boolean | ||
$name | string | The name of the sub-command. |
Résultat | boolean | Returns `true` if a sub-command with that name exists and `false` otherwise. |
public hasSubCommands ( ) : boolean | ||
Résultat | boolean | Returns `true` if the command has sub-commands and `false` otherwise. |
public parseArgs ( Webmozart\Console\Api\Args\RawArgs $args, boolean $lenient = null ) : |
||
$args | Webmozart\Console\Api\Args\RawArgs | The raw console arguments. |
$lenient | boolean | Whether the parser should ignore parse errors. If `true`, the parser will not throw any exceptions when parse errors occur. |
Résultat | The parsed console arguments. |