Method | Description | |
---|---|---|
__construct ( string $name = null, |
Creates a new configuration. | |
addAlias ( string $alias ) : static | Adds an alias name. | |
addAliases ( array $aliases ) : static | Adds a list of alias names. | |
addSubCommandConfig ( |
Adds configuration for a sub-command. | |
addSubCommandConfigs ( array $configs ) : static | Adds sub-command configurations to the command. | |
beginOptionCommand ( string $name, string $shortName = null ) : |
Starts a configuration block for an option command. | |
beginSubCommand ( string $name ) : |
Starts a configuration block for a sub-command. | |
buildArgsFormat ( |
Builds an {@link ArgsFormat} instance with the given base format. | |
create ( string $name = null, |
Creates a new configuration. | |
disable ( ) : static | Disables the command. | |
disableIf ( boolean $condition ) : static | Disables the command if a condition holds and enables it otherwise. | |
editOptionCommand ( string $name ) : |
Alias for {@link getSubCommandConfig()}. | |
editSubCommand ( string $name ) : |
Alias for {@link getSubCommandConfig()}. | |
enable ( ) : static | Enables the command. | |
enableIf ( boolean $condition ) : static | Enables the command if a condition holds and disables it otherwise. | |
end ( ) : |
Ends the block when dynamically configuring a command configuration. | |
getAliases ( ) : string[] | Returns the alias names of the command. | |
getApplicationConfig ( ) : |
Returns the application configuration. | |
getDescription ( ) : string | Returns the description of the command. | |
getHelp ( ) : string | Returns the help text of the command. | |
getName ( ) : string | Returns the name of the command. | |
getProcessTitle ( ) : string | null | Returns the title of the command process. | |
getSubCommandConfig ( string $name ) : |
Returns the sub-command configuration for a given name. | |
getSubCommandConfigs ( ) : |
Returns the configurations of all sub-commands. | |
hasSubCommandConfig ( string $name ) : boolean | Returns whether the command has a sub-command with a given name. | |
hasSubCommandConfigs ( ) : boolean | Returns whether the command has any registered sub-command configurations. | |
isAnonymous ( ) : boolean | Returns whether the command is anonymous. | |
isDefault ( ) : boolean | Returns whether the command is a default command. | |
isEnabled ( ) : boolean | Returns whether the command is enabled or not in the current environment. | |
markAnonymous ( ) : static | Marks the command as anonymous command. | |
markDefault ( ) : static | Marks the command as default command. | |
markNoDefault ( ) : static | Marks the command as neither anonymous nor default. | |
setAliases ( array $aliases ) : static | Sets the alias names of the command. | |
setApplicationConfig ( |
Sets the application configuration. | |
setDescription ( string $description ) : static | Sets the description of the command. | |
setHelp ( string $help ) : static | Sets the help text of the command. | |
setName ( string $name ) : static | Sets the name of the command. | |
setProcessTitle ( string | null $processTitle ) : static | Sets the title of the command process. | |
setSubCommandConfigs ( array $configs ) : static | Sets the sub-command configurations of the command. |
Method | Description | |
---|---|---|
getDefaultArgsParser ( ) | ||
getDefaultHandler ( ) | ||
getDefaultHandlerMethod ( ) | ||
getDefaultHelperSet ( ) | ||
getDefaultLenientArgsParsing ( ) |
public __construct ( string $name = null, |
||
$name | string | The name of the command. |
$applicationConfig | The application configuration. |
public addAliases ( array $aliases ) : static | ||
$aliases | array | The alias names to add. |
return | static | The current instance. |
public addSubCommandConfig ( |
||
$config | The sub-command configuration. | |
return | static | The current instance. |
public addSubCommandConfigs ( array $configs ) : static | ||
$configs | array | The sub-command configurations. |
return | static | The current instance. |
public beginOptionCommand ( string $name, string $shortName = null ) : |
||
$name | string | The name of the option command. |
$shortName | string | The short name of the option command. |
return | The option command configuration. |
public beginSubCommand ( string $name ) : |
||
$name | string | The name of the sub-command. |
return | The sub-command configuration. |
public buildArgsFormat ( |
||
$baseFormat | The base format. | |
return | The built format for the console arguments. |
public disable ( ) : static | ||
return | static | The current instance. |
public editOptionCommand ( string $name ) : |
||
$name | string | The name of the option command to edit. |
return | The option command configuration. |
public editSubCommand ( string $name ) : |
||
$name | string | The name of the sub-command to edit. |
return | The sub-command configuration. |
public enable ( ) : static | ||
return | static | The current instance. |
public end ( ) : |
||
return | The application configuration. |
public getAliases ( ) : string[] | ||
return | string[] | An array of alias names of the command. |
public getApplicationConfig ( ) : |
||
return | The application configuration. |
public getDescription ( ) : string | ||
return | string | The description of the command. |
public getProcessTitle ( ) : string | null | ||
return | string | null | The process title or `null` if no title should be set. |
public getSubCommandConfig ( string $name ) : |
||
$name | string | The name of the sub-command. |
return | The sub-command configuration. |
public getSubCommandConfigs ( ) : |
||
return | The sub-command configurations. |
public hasSubCommandConfig ( string $name ) : boolean | ||
$name | string | The name of the sub-command. |
return | boolean | Returns `true` if the sub-command configuration with the given name exists and `false` otherwise. |
public hasSubCommandConfigs ( ) : boolean | ||
return | boolean | Returns `true` if sub-command configurations were added to the command and `false` otherwise. |
public isAnonymous ( ) : boolean | ||
return | boolean | Returns `true` if {@link markAnonymous()} was called and `false` otherwise. |
public markAnonymous ( ) : static | ||
return | static | The current instance. |
public markDefault ( ) : static | ||
return | static | The current instance. |
public markNoDefault ( ) : static | ||
return | static | The current instance. |
public setAliases ( array $aliases ) : static | ||
$aliases | array | The alias names. |
return | static | The current instance. |
public setApplicationConfig ( |
||
$applicationConfig | The application configuration. |
public setDescription ( string $description ) : static | ||
$description | string | The description. |
return | static | The current instance. |
public setProcessTitle ( string | null $processTitle ) : static | ||
$processTitle | string | null | The process title or `null` if no title should be set. |
return | static | The current instance. |
public setSubCommandConfigs ( array $configs ) : static | ||
$configs | array | The sub-command configurations. |
return | static | The current instance. |