mKeyWord = ''; $this->mBrandId = 0; $this->mHotId = 0; if (!empty(trim($param['keyword']))) { $keywod = trim(urldecode($param['keyword'])); if ($this->check($keywod)) { $this->mKeyWord = trim(urldecode($param['keyword'])); $helper = new history_helper(); $helper->add_word($this->mKeyWord); } } if (intval($param['brand_id']) > 0) { $this->mBrandId = intval($param['brand_id']); } if (!empty(trim($param['hot_id']))) { $this->mHotId = intval($param['hot_id']); } } public function format() { if (empty($this->mKeyWord) && $this->mBrandId == 0 && $this->mHotId == 0) { return false; } else { $result = []; $result['keyword'] = $this->mKeyWord; $result['brand_id'] = $this->mBrandId; $result['hot_id'] = $this->mHotId; return $result; } } public function brand_id() { return $this->mBrandId; } private function mb_str_split($string) { return preg_split('/(?mb_str_split($keyword) as $word) { if (search\filter::filter($word)) { $words[] = $word; } } if (empty($words)) { return false; } else { return true; } } }