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