Exemplo n.º 1
0
 /**
  * @param AggregateRoot $aggregateRoot
  * @param int $expectedPlayHead
  * @return void
  * @throws ConcurrencyException
  */
 public function store(AggregateRoot $aggregateRoot, int $expectedPlayHead = -1)
 {
     $this->eventStore->save($aggregateRoot->getId(), $this->factory->getAggregateType(), $aggregateRoot->getUncommittedChanges(), $expectedPlayHead);
     $aggregateRoot->markChangesCommitted();
 }