/** * @overrides get from RestResource */ public function get() { if (parent::get() !== false) { $limit = $this->_pageLength; $offset = $this->_pageOffset; db()->setFetchMode(Zend_Db::FETCH_NUM); $res = db()->query("SELECT * FROM ppl_vo_xml_report(?, ?, ?, ?)", array($this->getParam("id"), $this->_pageLength, $this->_pageOffset, $this->_listMode))->fetchAll(); $ret = array(); foreach ($res as $r) { $ret[] = $r[0]; } return new XMLFragmentRestResponse($ret, $this); } else { return false; } }
public function get() { if (parent::get() !== false) { db()->setFetchMode(Zend_Db::FETCH_NUM); $res = db()->query("SELECT researcher_privs_to_xml(?, ?)", array($this->getParam("id"), $this->_userid))->fetchAll(); $ret = array(); foreach ($res as $r) { $ret[] = $r[0]; } return new XMLFragmentRestResponse($ret, $this); } else { return false; } }