__METHOD__]); // Our data is in a payload value parent::__construct($request); } /** * Enable getting values for keys in the response * * @note: This method is limited to certain values to ensure integrity reasons * @note: Classes should return: * + channel_id, * + team_id, * + ts, * + user_id * @param string $key * @return mixed|object */ public function __get(string $key) { switch ($key) { case 'team_id': return object_get($this->_data,'team.id'); case 'channel_id': return object_get($this->_data,'channel.id'); case 'user_id': return object_get($this->_data,'user.id'); case 'callback_id': //case 'action_ts': //case 'message_ts': case 'type': return object_get($this->_data,$key); } } }