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

addCommandConfig() public method

Adds a command configuration to the application.
See also: beginCommand()
public addCommandConfig ( CommandConfig $config ) : static
$config CommandConfig The command configuration.
return static The current instance.
    public function addCommandConfig(CommandConfig $config)
    {
        // The name is dynamic, so don't store by name
        $this->commandConfigs[] = $config;
        return $this;
    }

Usage Example

Ejemplo n.º 1
0
 public function testHasCommandConfigs()
 {
     $this->assertFalse($this->config->hasCommandConfigs());
     $this->config->addCommandConfig($config = new CommandConfig());
     $this->assertTrue($this->config->hasCommandConfigs());
 }
All Usage Examples Of Webmozart\Console\Api\Config\ApplicationConfig::addCommandConfig