PHP Class Webmozart\Console\Api\Config\SubCommandConfig

A sub-command is defined within the scope of another command. For example, in the command server add , the command "add" is a sub-command of the "server" command.
See also: OptionCommandConfig
Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: extends CommandConfig
Datei anzeigen Open project: webmozart/console Class Usage Examples

Public Methods

Method Description
__construct ( string $name = null, CommandConfig $parentConfig = null ) Creates a new configuration.
end ( ) : CommandConfig | SubCommandConfig | OptionCommandConfig Ends the block when dynamically configuring a nested configuration.
getParentConfig ( ) : CommandConfig Returns the parent command configuration.
setParentConfig ( CommandConfig $parentConfig ) Sets the parent command configuration.

Protected Methods

Method Description
getDefaultArgsParser ( )
getDefaultHandler ( )
getDefaultHandlerMethod ( )
getDefaultHelperSet ( )
getDefaultLenientArgsParsing ( )

Method Details

__construct() public method

Creates a new configuration.
public __construct ( string $name = null, CommandConfig $parentConfig = null )
$name string The name of the command.
$parentConfig CommandConfig The command configuration that contains this configuration.

end() public method

This method is usually used together with {@link CommandConfig::beginSubCommand()}, {@link CommandConfig::beginOptionCommand()} or {@link CommandConfig::beginDefaultCommand()}: php $config ->beginSubCommand('add') ... ->end() ... ;
public end ( ) : CommandConfig | SubCommandConfig | OptionCommandConfig
return CommandConfig | SubCommandConfig | OptionCommandConfig The parent command configuration.

getDefaultArgsParser() protected method

protected getDefaultArgsParser ( )

getDefaultHandler() protected method

protected getDefaultHandler ( )

getDefaultHandlerMethod() protected method

protected getDefaultHandlerMethod ( )

getDefaultHelperSet() protected method

protected getDefaultHelperSet ( )

getDefaultLenientArgsParsing() protected method

getParentConfig() public method

Returns the parent command configuration.
public getParentConfig ( ) : CommandConfig
return CommandConfig The parent command configuration.

setParentConfig() public method

Sets the parent command configuration.
public setParentConfig ( CommandConfig $parentConfig )
$parentConfig CommandConfig The parent command configuration.