Webmozart\Console\ConsoleApplication::addCommand PHP Method

addCommand() private method

private addCommand ( CommandConfig $config )
$config Webmozart\Console\Api\Config\CommandConfig
    private function addCommand(CommandConfig $config)
    {
        if (!$config->isEnabled()) {
            return;
        }
        $this->validateCommandName($config);
        $command = new Command($config, $this);
        $this->commands->add($command);
        if ($config->isDefault()) {
            $this->defaultCommands->add($command);
        }
        if (!$config->isAnonymous()) {
            $this->namedCommands->add($command);
        }
    }