src/Dispatcher/CommandDispatcher.php
public function addCommandHandler(CommandHandlerInterface $commandHandler, string $payloadName): CommandDispatcher
    {
        $this->commandHandlers[$payloadName] = $commandHandler;

        return $this;
    }
public function addCommandHandler(CommandHandlerInterface $commandHandler, string $payloadName): CommandDispatcher
    {
        $this->commandHandlers[$payloadName] = $commandHandler;

        return $this;
    }
public function addCommandHandler ( CommandHandlerInterface $ commandHandler , string $ payloadName ) : CommandDispatcher { $ this -> commandHandlers [ $ payloadName ] = $ commandHandler ; return $ this ; }
Add command handler for payload name.

@param CommandHandlerInterface $commandHandler
@param string                  $payloadName
@return CommandDispatcher
Add command handler for payload name .