Skip to content

CommandHandlerResolver

  • Full name: \Codefy\CommandBus\CommandHandlerResolver

Methods

resolve

Retrieve a CommandHandler for a given Command.

public resolve(\Codefy\CommandBus\Command $command): \Codefy\CommandBus\CommandHandler

Parameters:

Parameter Type Description
$command \Codefy\CommandBus\Command

bindHandler

Bind a handler to a command. These bindings should overrule the default resolution behavior for this resolver.

public bindHandler(string $commandName, \Codefy\CommandBus\CommandHandler|callable|string $handler): mixed

Parameters:

Parameter Type Description
$commandName string
$handler \Codefy\CommandBus\CommandHandler|callable|string


Automatically generated on 2025-10-13