* @version : HUOSDK 8.0 */ namespace huolib\queue\request; class Crash extends Request { private $active = ''; /* 奔溃页面 */ private $msg = ''; /* 奔溃信息 长度65535 */ public function __construct($data = []) { if (!empty($data)) { $this->setData($data); } } /** * 设置数据 * * @param array $data */ public function setData($data = []) { if (empty($data)) { return; } $this->setActive(get_val($data, 'active', '')); $this->setMsg(get_val($data, 'msg', '')); } /** * 变量转数组 * * @return array */ public function toArray() { $_data['active'] = $this->getActive(); $_data['msg'] = $this->getMsg(); return $_data; } /** * check参数合法性 */ public function check() { // TODO: wuyonghong 2018/5/30 校验奔溃参数合法性 return true; } /** * @return string */ public function getActive() { return $this->active; } /** * @param string $active */ public function setActive($active) { $this->active = $active; } /** * @return string */ public function getMsg() { return $this->msg; } /** * @param string $msg */ public function setMsg($msg) { $this->msg = $msg; } }