/** * @return mixed */ public function search() { if (empty($this->filters)) { throw new DuedilApiException('The filters can\' be null'); } $this->query = array(ResponseEnum::FILTERS => json_encode($this->filters)); if (!empty($this->orderBy)) { $this->orderBy = array(ResponseEnum::ORDER_BY => json_encode($this->orderBy)); $this->query = array_merge($this->query, $this->orderBy); } return parent::run(); }