public function suggestionAction() { $searchModel = new Application_Model_Search($this->registry->DB); $from = $this->getRequest()->getParam('from'); if (empty($from) && !(is_int($from) || ctype_digit($from))) { $from = 0; } $limit = $this->getRequest()->getParam('limit'); if (empty($limit) && !(is_int($limit) || ctype_digit($limit))) { $limit = 20; } $this->view->results = $searchModel->frndSuggestion($from, $limit); }