public function publicationtitleAction() { $publications = new Publications(); $pubjson = $publications->getTitles(urlencode($this->_getParam('q'))); echo Zend_Json::encode($pubjson); }
/** Get the publications as json * @access public */ public function publicationsAction() { if ($this->getParam('term', false)) { $publication = new Publications(); $json = $publication->getTitles($this->getParam('term')); } else { $json = array(null => 'You must choose an author first'); } echo Zend_Json::encode($json); }