/** * {@inheritdoc} */ protected function assignResult($event) { parent::assignResult($event); if ($this->type === null) { throw new Exception("A message cannot be represented by the ConversationEvent class."); } $this->event = unserialize($event['message']); }
/** * {@inheritdoc} */ protected function assignResult($message) { parent::assignResult($message); if ($this->type !== null) { throw new Exception("A conversation event cannot be represented by the Message class."); } $this->player_from = $message['player_from']; $this->message = $message['message']; }