메소드 | 설명 | |
---|---|---|
__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. |
메소드 | 설명 | |
---|---|---|
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[] | ||
리턴 | string[] | An array of alias names of the command. |
public getApplication ( ) : Webmozart\Console\Api\Application\Application | ||
리턴 | Webmozart\Console\Api\Application\Application | The console application. |
public getArgsFormat ( ) : |
||
리턴 | The input definition. |
public getConfig ( ) : |
||
리턴 | The command configuration. |
public getDefaultSubCommands ( ) : |
||
리턴 | The default commands. |
public getNamedSubCommands ( ) : |
||
리턴 | The named commands. |
public getParentCommand ( ) : |
||
리턴 | The parent command. |
public getShortName ( ) : string | null | ||
리턴 | 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. |
리턴 | The sub-command. |
public getSubCommands ( ) : |
||
리턴 | The sub-commands. |
public hasAliases ( ) : boolean | ||
리턴 | boolean | Returns `true` if the command has aliases and `false` otherwise. |
public hasDefaultSubCommands ( ) : boolean | ||
리턴 | boolean | Returns `true` if the command has default commands and `false` otherwise. |
public hasNamedSubCommands ( ) : boolean | ||
리턴 | 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. |
리턴 | boolean | Returns `true` if a sub-command with that name exists and `false` otherwise. |
public hasSubCommands ( ) : boolean | ||
리턴 | 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. |
리턴 | The parsed console arguments. |