/** * @param IdentifiesObject $id * * @throws Exceptions\AggregateRootNotFound * @return AggregatesObjects */ private function getTrackedAggregateRootWithId(IdentifiesObject $id) { return $this->aggregateRootCollection->find($id); }
/** * @throws CommittingEventsFailed */ public final function commitChanges() { $changes = $this->aggregateRootCollection->getChanges(); $this->commitChangesToEventStore($changes); $this->aggregateRootCollection->clearCommittedChanges($changes); }