getRestParams(); $year = count($params) > 0 ? $params[0] : null; $existsYears = $this->_getDataObj()->getExistingYears(); if (empty($existsYears) && !empty($year)) { $this->_doc->display404(); } if (!empty($existsYears)) { if (empty($year)) { Qs_Http::redirect(BASE_URL . '/' . CURRENT_PAGE_FINAL . '/' . $existsYears[0]); } if (ctype_digit($year)) { if (!in_array($year, $existsYears)) { $this->_doc->display404(); } $this->_years['year'] = $year; $this->_years['years'] = $existsYears; $this->_setYearFilter($year); } else { $this->_doc->display404(); } } return $this; } }