public function regionsAction() { if ($this->_getParam('term', false)) { $regions = new Counties(); $response = $regions->getRegions($this->_getParam('term')); } else { $response = array('id' => NULL, 'term' => 'No county specified'); } echo Zend_Json::encode($response); }
/** Get the regions list * @access public */ public function regionsAction() { if ($this->getParam('term', false)) { $regions = new Counties(); $response = $regions->getRegions($this->getParam('term')); echo Zend_Json::encode($response); } else { throw new Pas_Exception_Param($this->_missingParameter, 500); } }