Dumplie\SharedKernel\Application\EventLog::log PHP Method

log() public method

public log ( Dumplie\SharedKernel\Domain\Event\Event $event )
$event Dumplie\SharedKernel\Domain\Event\Event
    public function log(Event $event);

Usage Example

 /**
  * @param string $orderId
  */
 public function customerPlacedOrder(string $orderId)
 {
     $transaction = $this->transactionFactory->open();
     try {
         $this->eventLog->log(new CustomerPlacedOrder($orderId));
         $transaction->commit();
     } catch (\Exception $e) {
         $transaction->rollback();
         throw $e;
     }
 }
All Usage Examples Of Dumplie\SharedKernel\Application\EventLog::log