Example #1
0
 public function get()
 {
     return parent::get();
 }
Example #2
0
 public function get()
 {
     if (parent::get() !== false) {
         db()->setFetchMode(Zend_Db::FETCH_OBJ);
         $appid = $this->getParam("id");
         if (!is_numeric($appid)) {
             $appid = "(SELECT id FROM applications WHERE cname ILIKE '" . pg_escape_string(substr($this->getParam("id"), 2)) . "' FETCH FIRST 1 ROWS ONLY)";
         }
         $res = db()->query("SELECT context_to_xml(" . $appid . ") AS xml;")->fetchAll();
         $x = array();
         foreach ($res as $r) {
             $x[] = $r->xml;
         }
         return new XMLFragmentRestResponse($x, $this);
     } else {
         return false;
     }
 }