public function getItemSearchData($pageNumber, $num, $valueToSearch) { $goods = new DBGoodsType(); $keyMas = array(); $valueMas = array(); array_push($keyMas, DB::TABLE_GOODS__NAME); array_push($keyMas, DB::TABLE_GOODS__DESCRIPTION); array_push($valueMas, "(" . mb_convert_case($valueToSearch, MB_CASE_LOWER, "utf-8") . ")+"); array_push($valueMas, "(" . mb_convert_case($valueToSearch, MB_CASE_LOWER, "utf-8") . ")+"); $limitBegin = ($pageNumber - 1) * $num; $limitNum = $num; if ($this->isAdminOrderEnabled()) { $goods->getUserSortedForSearch($keyMas, $valueMas, $limitBegin, $limitNum); } else { $goods->executeRequestRegExpArrayWithLimit($keyMas, $valueMas, DB::TABLE_GOODS___ORDER, DB::ASC, $limitBegin, $limitNum); } $this->data = $goods->getResponse(); $this->dataCount = $goods->getResponseSize(); $goods->getGoodsSearchCount($keyMas, $valueMas); $this->dataTotalCount = $goods->getTotalCount(); }