Example #1
0
 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);
 }
Example #2
0
 private function applyPostWasUpdated(PostWasUpdated $event)
 {
     $this->setTitle($event->getTitle());
     $this->setContent($event->getContent());
 }