Пример #1
0
 /**
  * @param Uuid $id
  * @return AggregateRoot
  * @throws AggregateNotFoundException
  */
 public function findById(Uuid $id)
 {
     $events = $this->storage->getEventsForAggregate($id);
     $book = new Book($id);
     $book->loadFromHistory($events);
     return $book;
 }