/** * Apply and record an event * * @param Event $event * @return void * @author Francisco Iglesias Gómez */ protected function recordThat(Event $event) { if (!$this->canHandleEvent($event)) { return; } $this->apply($event); $this->initStream(); $this->events->recordThat(EventMessage::record($event, EntityDTO::fromEntity($this))); }