public function applyPostWritten(PostWritten $event) { $this->id = $event->PostId(); $this->title = $event->title(); $this->content = $event->content(); $this->type = $event->type(); }