public function onPostWasUpdated(PostWasUpdated $event) { $postListProjection = $this->projectionStorage->findById('post-list', $event->getAggregateId()); $postListProjection->title = $event->getTitle(); $postListProjection->content = $event->getContent(); $this->projectionStorage->save($postListProjection); }
private function applyPostWasUpdated(PostWasUpdated $event) { $this->setTitle($event->getTitle()); $this->setContent($event->getContent()); }