Webmozart\Console\Api\Config\ApplicationConfig::editCommand PHP Method

editCommand() public method

This method can be used to nicely edit a command inherited from a parent configuration using the fluent API: php protected function configure() { parent::configure(); $this ->editCommand('add') ... ->end() ... ; }
See also: beginCommand()
public editCommand ( string $name ) : CommandConfig
$name string The name of the command to edit.
return CommandConfig The command configuration.
    public function editCommand($name)
    {
        return $this->getCommandConfig($name);
    }

Usage Example

Ejemplo n.º 1
0
 public function testEditCommand()
 {
     $this->config->addCommandConfig($config1 = new CommandConfig('command1'));
     $this->assertSame($config1, $this->config->editCommand('command1'));
 }