Dumplie\SharedKernel\Application\CommandBus::handle PHP Method

handle() public method

public handle ( Dumplie\SharedKernel\Application\Command\Command $command )
$command Dumplie\SharedKernel\Application\Command\Command
    public function handle(Command $command);

Usage Example

 /**
  * @param OrderId $orderId
  * @return PaymentId
  */
 public function createPaymentFor(OrderId $orderId) : PaymentId
 {
     $paymentId = PaymentId::generate();
     $command = new CreatePayment((string) $orderId, (string) $paymentId);
     $this->commandBus->handle($command);
     return $paymentId;
 }
All Usage Examples Of Dumplie\SharedKernel\Application\CommandBus::handle
CommandBus