Overview

Namespaces

  • Webmozart
    • Console
      • Adapter
      • Api
        • Application
        • Args
          • Format
        • Command
        • Config
        • Event
        • Formatter
        • IO
        • Resolver
      • Args
      • Config
      • Formatter
      • Handler
        • Help
      • IO
        • InputStream
        • OutputStream
      • Process
      • Resolver
      • UI
        • Alignment
        • Component
        • Help
        • Layout
        • Style
      • Util

Classes

  • ApplicationConfig
  • CommandConfig
  • Config
  • OptionCommandConfig
  • SubCommandConfig
  • Overview
  • Namespace
  • Class

Class SubCommandConfig

The configuration of an console sub-command.

A sub-command is defined within the scope of another command. For example, in the command server add <host>, the command "add" is a sub-command of the "server" command.

Webmozart\Console\Api\Config\Config
Extended by Webmozart\Console\Api\Config\CommandConfig
Extended by Webmozart\Console\Api\Config\SubCommandConfig

Direct known subclasses

Webmozart\Console\Api\Config\OptionCommandConfig
Namespace: Webmozart\Console\Api\Config
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
See: Webmozart\Console\Api\Config\OptionCommandConfig
Located at Api/Config/SubCommandConfig.php
Methods summary
public
# __construct( string $name = null, Webmozart\Console\Api\Config\CommandConfig $parentConfig = null )

Creates a new configuration.

Creates a new configuration.

Parameters

$name
The name of the command.
$parentConfig

The command configuration that contains this configuration.

Overrides

Webmozart\Console\Api\Config\CommandConfig::__construct()
public Webmozart\Console\Api\Config\CommandConfig
# getParentConfig( )

Returns the parent command configuration.

Returns the parent command configuration.

Returns

Webmozart\Console\Api\Config\CommandConfig
The parent command configuration.
public
# setParentConfig( Webmozart\Console\Api\Config\CommandConfig $parentConfig )

Sets the parent command configuration.

Sets the parent command configuration.

Parameters

$parentConfig
The parent command configuration.
public Webmozart\Console\Api\Config\CommandConfig|Webmozart\Console\Api\Config\SubCommandConfig|Webmozart\Console\Api\Config\OptionCommandConfig
# end( )

Ends the block when dynamically configuring a nested configuration.

Ends the block when dynamically configuring a nested configuration.

This method is usually used together with CommandConfig::beginSubCommand(), CommandConfig::beginOptionCommand() or CommandConfig::beginDefaultCommand():

$config ->beginSubCommand('add') // ... ->end()
 // ...
;

Returns

Webmozart\Console\Api\Config\CommandConfig|Webmozart\Console\Api\Config\SubCommandConfig|Webmozart\Console\Api\Config\OptionCommandConfig
The parent command configuration.

Overrides

Webmozart\Console\Api\Config\CommandConfig::end()
protected HelperSet
# getDefaultHelperSet( )

Returns the helper set to use if none is set.

Returns the helper set to use if none is set.

Returns

HelperSet
The default helper set.

Overrides

Webmozart\Console\Api\Config\CommandConfig::getDefaultHelperSet()
protected object
# getDefaultHandler( )

Returns the command handler to use if none is set.

Returns the command handler to use if none is set.

Returns

object
The default command handler.

Overrides

Webmozart\Console\Api\Config\CommandConfig::getDefaultHandler()
protected string
# getDefaultHandlerMethod( )

Returns the handler method to use if none is set.

Returns the handler method to use if none is set.

Returns

string
The default handler method.

Overrides

Webmozart\Console\Api\Config\CommandConfig::getDefaultHandlerMethod()
protected ArgsParser
# getDefaultArgsParser( )

Returns the arguments parser to use if none is set.

Returns the arguments parser to use if none is set.

Returns

ArgsParser
The default args parser.

Overrides

Webmozart\Console\Api\Config\CommandConfig::getDefaultArgsParser()
protected boolean
# getDefaultLenientArgsParsing( )

Returns whether the arguments parsing handles errors gracefully.

Returns whether the arguments parsing handles errors gracefully.

Returns

boolean
The default value for lenient args parsing.

Overrides

Webmozart\Console\Api\Config\CommandConfig::getDefaultLenientArgsParsing()
Methods inherited from Webmozart\Console\Api\Config\CommandConfig
addAlias(), addAliases(), addSubCommandConfig(), addSubCommandConfigs(), beginOptionCommand(), beginSubCommand(), buildArgsFormat(), create(), disable(), disableIf(), editOptionCommand(), editSubCommand(), enable(), enableIf(), getAliases(), getApplicationConfig(), getDescription(), getHelp(), getName(), getProcessTitle(), getSubCommandConfig(), getSubCommandConfigs(), hasSubCommandConfig(), hasSubCommandConfigs(), isAnonymous(), isDefault(), isEnabled(), markAnonymous(), markDefault(), markNoDefault(), setAliases(), setApplicationConfig(), setDescription(), setHelp(), setName(), setProcessTitle(), setSubCommandConfigs()
Methods inherited from Webmozart\Console\Api\Config\Config
addArgument(), addOption(), configure(), disableLenientArgsParsing(), enableLenientArgsParsing(), getArgsParser(), getArguments(), getHandler(), getHandlerMethod(), getHelperSet(), getOptions(), isLenientArgsParsingEnabled(), setArgsParser(), setHandler(), setHandlerMethod(), setHelperSet()
Webmozart Console API API documentation generated by ApiGen