event->attach("beforeProcessing", Array($this->render, 'check_id'));
$this->event->attach("onInit", Array($this->render, 'replace_postfix'));
}
/*! if not isset $_GET[id] then it's top level
*/
protected function set_relation() {
if (!isset($_GET['id'])) $this->request->set_relation(false);
}
/*! if it's first level then distinct level
* else select by parent
*/
protected function get_resource() {
$resource = null;
if (isset($_GET['id']))
$resource = $this->sql->select($this->request);
else
$resource = $this->sql->get_variants($this->config->relation_id['name'], $this->request);
return $resource;
}
/*! renders self as xml, starting part
*/
public function xml_start(){
if (isset($_GET['id'])) {
return "render->get_postfix()."'>";
} else {
return "";
}
}
}
?>