Make CommandBus use CommandResolverInterface
* Add CommandResolverInterface to resolve commands. * Replace single CommandRegistry with CommandResolverInterface[] in CommandBus. * Make CommandRegistry implement CommandResolverInterface.
This commit is contained in:
@ -38,8 +38,8 @@ class CommandBusClient implements CommandBusInterface
|
||||
{
|
||||
$this->commandRegistry = $commandRegistry;
|
||||
if ($commandRegistry) {
|
||||
$commandRegistry->on(CommandRegistry::EVENT_REGISTERED, $this->onCommandRegistered(...));
|
||||
$commandRegistry->on(CommandRegistry::EVENT_UNREGISTERED, $this->onCommandUnregistered(...));
|
||||
$this->commandRegistry->on(CommandRegistry::EVENT_REGISTERED, $this->onCommandRegistered(...));
|
||||
$this->commandRegistry->on(CommandRegistry::EVENT_UNREGISTERED, $this->onCommandUnregistered(...));
|
||||
}
|
||||
$this->connector = $connector??new TcpConnector();
|
||||
}
|
||||
|
Reference in New Issue
Block a user