/** * @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; }