Method | Description | |
---|---|---|
__construct ( ) | Creates a new configuration. | |
addArgument ( string $name, integer $flags, string $description = null, mixed $default = null ) : |
Adds an argument. | |
addOption ( string $longName, string $shortName = null, integer $flags, string $description = null, mixed $default = null, string $valueName = '...' ) : |
Adds an option. | |
disableLenientArgsParsing ( ) : |
Disables lenient argument parsing. | |
enableLenientArgsParsing ( ) : |
Enables lenient argument parsing. | |
getArgsParser ( ) : Webmozart\Console\Api\Args\ArgsParser | Returns the configured argument parser. | |
getArguments ( ) : |
Returns the configured arguments. | |
getHandler ( ) : object | Returns the command handler to execute when a command is run. | |
getHandlerMethod ( ) : string | Returns the method of the command handler that should be executed when the configured command is run. | |
getHelperSet ( ) : Symfony\Component\Console\Helper\HelperSet | Returns the configured helper set. | |
getOptions ( ) : |
Returns the configured options. | |
isLenientArgsParsingEnabled ( ) : boolean | Returns whether lenient argument parsing is enabled. | |
setArgsParser ( Webmozart\Console\Api\Args\ArgsParser $argsParser ) : |
Sets the used argument parser. | |
setHandler ( object | callback $handler ) : |
Sets the command handler to execute when a command is run. | |
setHandlerMethod ( string $handlerMethod ) : |
Sets the method of the command handler that should be executed when the configured command is run. | |
setHelperSet ( Symfony\Component\Console\Helper\HelperSet $helperSet ) : |
Sets the used helper set. |
Method | Description | |
---|---|---|
configure ( ) | Adds the default configuration. | |
getDefaultArgsParser ( ) : Webmozart\Console\Api\Args\ArgsParser | Returns the arguments parser to use if none is set. | |
getDefaultHandler ( ) : object | Returns the command handler to use if none is set. | |
getDefaultHandlerMethod ( ) : string | Returns the handler method to use if none is set. | |
getDefaultHelperSet ( ) : Symfony\Component\Console\Helper\HelperSet | Returns the helper set to use if none is set. | |
getDefaultLenientArgsParsing ( ) : boolean | Returns whether the arguments parsing handles errors gracefully. |
public addArgument ( string $name, integer $flags, string $description = null, mixed $default = null ) : |
||
$name | string | The argument name. |
$flags | integer | A bitwise combination of the flag constants in the {@link Argument} class. |
$description | string | A one-line description of the argument. |
$default | mixed | The default value. Must be `null` if the flags contain {@link Argument::REQUIRED}. |
return | The current instance. |
public addOption ( string $longName, string $shortName = null, integer $flags, string $description = null, mixed $default = null, string $valueName = '...' ) : |
||
$longName | string | The long option name. |
$shortName | string | The short option name. Can be `null`. |
$flags | integer | A bitwise combination of the flag constants in the {@link Option} class. |
$description | string | A one-line description of the option. |
$default | mixed | The default value. Must be `null` if the flags contain {@link Option::REQUIRED_VALUE}. |
$valueName | string | The name of the value to be used in usage examples of the option. |
return | The current instance. |
public disableLenientArgsParsing ( ) : |
||
return | The current instance. |
public enableLenientArgsParsing ( ) : |
||
return | The current instance. |
public getArgsParser ( ) : Webmozart\Console\Api\Args\ArgsParser | ||
return | Webmozart\Console\Api\Args\ArgsParser | The argument parser. |
public getArguments ( ) : |
||
return | The configured arguments. |
protected getDefaultArgsParser ( ) : Webmozart\Console\Api\Args\ArgsParser | ||
return | Webmozart\Console\Api\Args\ArgsParser | The default args parser. |
protected getDefaultHandler ( ) : object | ||
return | object | The default command handler. |
protected getDefaultHandlerMethod ( ) : string | ||
return | string | The default handler method. |
protected getDefaultHelperSet ( ) : Symfony\Component\Console\Helper\HelperSet | ||
return | Symfony\Component\Console\Helper\HelperSet | The default helper set. |
protected getDefaultLenientArgsParsing ( ) : boolean | ||
return | boolean | The default value for lenient args parsing. |
public getHandler ( ) : object | ||
return | object | The command handler. |
public getHandlerMethod ( ) : string | ||
return | string | The method name. |
public getHelperSet ( ) : Symfony\Component\Console\Helper\HelperSet | ||
return | Symfony\Component\Console\Helper\HelperSet | The helper set. |
public getOptions ( ) : |
||
return | The configured options. |
public isLenientArgsParsingEnabled ( ) : boolean | ||
return | boolean | Returns `true` if lenient parsing is enabled and `false` otherwise. |
public setArgsParser ( Webmozart\Console\Api\Args\ArgsParser $argsParser ) : |
||
$argsParser | Webmozart\Console\Api\Args\ArgsParser | The argument parser. |
return | The current instance. |
public setHandler ( object | callback $handler ) : |
||
$handler | object | callback | The command handler or the callable creating a new command handler on demand. |
return | The current instance. |
public setHandlerMethod ( string $handlerMethod ) : |
||
$handlerMethod | string | The method name. |
return | The current instance. |
public setHelperSet ( Symfony\Component\Console\Helper\HelperSet $helperSet ) : |
||
$helperSet | Symfony\Component\Console\Helper\HelperSet | The helper set. |
return | The current instance. |