public function get() { if (parent::get() !== false) { $rs = $this->getParam("data"); if (!$rs) { $rs = $this->getRawData(); } if ($rs !== null) { $s = '<repository datatype="item" content="repositoryarea">'; $s .= '<MetaProductRepoArea id="' . $this->getParam("id") . '">'; $s .= '<' . $this->getParam("name") . '><![CDATA[' . $rs . ']]></' . $this->getParam("name") . '>'; $s .= '</MetaProductRepoArea></repository>'; return $s; } else { $this->setError(RestErrorEnum::RE_ITEM_NOT_FOUND); return false; } } }
/** * @overrides get() from RestResource */ public function get() { if (parent::get() !== false) { $res = new Default_Model_Dissemination(); if (is_null($this->getParam("orderby"))) { $res->filter->orderBy("senton DESC"); } else { $res->filter->orderBy($this->getParam("orderby")); } $res->filter->id->equals($this->getParam("id")); $res->refresh("xml"); return new XMLFragmentRestResponse($res->items); } else { return false; } }
public function get() { if (parent::get() !== false) { error_log("[RestAppVAVersionIntegrityItem]: INTEGRITY CHECK FOR vappid: " . $this->_res->vappid . " versionid: " . $this->_res->id); //db()->setFetchMode(Zend_Db::FETCH_OBJ); //$res = db()->query("SELECT vapp_to_xml(" . $this->getParam("vappid") . ", 'vapplications') AS xml;")->fetchAll(); $x = array(); /*foreach($res as $r) { $x[] = $r->xml; }*/ //$x[] = "<virtualization:lala>lolo</virtualization:lala>"; //return new XMLRestResponse($x,$this->_parent); return new XMLFragmentRestResponse("<virtualization:integrity>not implemented yet</virtualization:integrity>", $this); //return new XMLFragmentRestResponse($x, $this); } else { return false; } }