public function onPostWasPublished(PostWasPublished $event) { $postListProjection = new PostListProjection($event->getAggregateId(), $event->getTitle(), $event->getPublishingDate()); $this->projectionStorage->save($postListProjection); }
private function applyPostWasPublished(PostWasPublished $event) { $this->setTitle($event->getTitle()); $this->setContent($event->getContent()); $this->setPublishingDate($event->getPublishingDate()); }