The configuration of the command is returned by this method. You can use
the fluent interface to configure the sub-command before jumping back to
this configuration with {@link CommandConfig::end()}:
php
protected function configure()
{
$this
->setName('server')
->setDescription('List and manage servers')
->beginCommand('add')
->setDescription('Add a server')
->addArgument('host', Argument::REQUIRED)
->addOption('port', 'p', Option::VALUE_OPTIONAL, null, 80)
->end()
...
;
}
public beginCommand ( string $name ) : |
||
$name | string | The name of the command. |
return | The command configuration. |