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:
2024-12-15 13:24:57 +01:00
parent 585be681bd
commit 07f8ae467c
4 changed files with 95 additions and 9 deletions

View File

@ -8,7 +8,7 @@ use Evenement\EventEmitterTrait;
* A collection of commands that can be executed via CommandBusInterface
*
*/
class CommandRegistry implements EventEmitterInterface
class CommandRegistry implements CommandResolverInterface, EventEmitterInterface
{
use EventEmitterTrait;