예제 #1
0
 public function publicationtitleAction()
 {
     $publications = new Publications();
     $pubjson = $publications->getTitles(urlencode($this->_getParam('q')));
     echo Zend_Json::encode($pubjson);
 }
예제 #2
0
 /** 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);
 }