Dumplie\SharedKernel\Tests\Context\CommandBusFactory::create PHP Method

create() public method

public create ( array $handlers = [], array $commandExtension = [] ) : Dumplie\SharedKernel\Application\CommandBus
$handlers array
$commandExtension array
return Dumplie\SharedKernel\Application\CommandBus
    public function create(array $handlers = [], array $commandExtension = []) : CommandBus;

Usage Example

Ejemplo n.º 1
0
 /**
  * @param CommandBusFactory $commandBusFactory
  * @param EventLog $eventLog
  * @return CommandBus
  */
 protected function createCommandBus(CommandBusFactory $commandBusFactory, EventLog $eventLog, array $commandExtension = []) : CommandBus
 {
     return $commandBusFactory->create([CreateProduct::class => new CreateProductHandler($this->products), PutBackProductToStock::class => new PutBackProductToStockHandler($this->products), RemoveProductFromStock::class => new RemoveProductFromStockHandler($this->products)], $commandExtension);
 }
All Usage Examples Of Dumplie\SharedKernel\Tests\Context\CommandBusFactory::create
CommandBusFactory