Пример #1
0
 public function render()
 {
     EventMaster::trigger_static("connectorInit", $this);
     $this->parse_request();
     if ($this->live_update !== false && $this->updating !== false) {
         $this->live_update->get_updates();
     } else {
         if ($this->editing) {
             $dp = new $this->names["data_class"]($this, $this->config, $this->request);
             $dp->process($this->config, $this->request);
         } else {
             $wrap = new SortInterface($this->request);
             $this->event->trigger("beforeSort", $wrap);
             $wrap->store();
             $wrap = new FilterInterface($this->request);
             $this->event->trigger("beforeFilter", $wrap);
             $wrap->store();
             $this->output_as_xml($this->sql->select($this->request));
         }
     }
     $this->end_run();
 }
 public function __construct($res, $type = false, $item_type = false, $data_type = false)
 {
     $this->options = new JSONOptionsConnector($res, $type, $item_type, $data_type);
     $this->link = new DelayedConnector($res, $type, $item_type, $data_type);
     EventMaster::attach_static("connectorInit", array($this, "handle"));
 }
Пример #3
0
 public function __construct($url)
 {
     $this->url = $url;
     $this->pdf();
     EventMaster::attach_static("connectorInit", array($this, "handle"));
 }
Пример #4
0
 public function render()
 {
     $this->event->trigger("onInit", $this);
     EventMaster::trigger_static("connectorInit", $this);
     if (!$this->as_string) {
         $this->parse_request();
     }
     $this->set_relation();
     if ($this->live_update !== false && $this->updating !== false) {
         $this->live_update->get_updates();
     } else {
         if ($this->editing) {
             $dp = new $this->names["data_class"]($this, $this->config, $this->request);
             $dp->process($this->config, $this->request);
         } else {
             if (!$this->access->check("read")) {
                 LogMaster::log("Access control: read operation blocked");
                 echo "Access denied";
                 die;
             }
             $wrap = new SortInterface($this->request);
             $this->apply_sorts($wrap);
             $this->event->trigger("beforeSort", $wrap);
             $wrap->store();
             $wrap = new FilterInterface($this->request);
             $this->apply_filters($wrap);
             $this->event->trigger("beforeFilter", $wrap);
             $wrap->store();
             if ($this->model && method_exists($this->model, "get")) {
                 $this->sql = new ArrayDBDataWrapper();
                 $result = new ArrayQueryWrapper(call_user_func(array($this->model, "get"), $this->request));
                 $out = $this->output_as_xml($result);
             } else {
                 $out = $this->output_as_xml($this->get_resource());
                 if ($out !== null) {
                     return $out;
                 }
             }
         }
     }
     $this->end_run();
 }
Пример #5
0
 public function render()
 {
     $this->event->trigger("onInit", $this);
     EventMaster::trigger_static("connectorInit", $this);
     $this->parse_request();
     if ($this->live_update !== false && $this->updating !== false) {
         $this->live_update->get_updates();
     } else {
         if ($this->editing) {
             $dp = new $this->names["data_class"]($this, $this->config, $this->request);
             $dp->process($this->config, $this->request);
         } else {
             if (!$this->access->check("read")) {
                 LogMaster::log("Access control: read operation blocked");
                 echo "Access denied";
                 die;
             }
             $wrap = new SortInterface($this->request);
             $this->event->trigger("beforeSort", $wrap);
             $wrap->store();
             $wrap = new FilterInterface($this->request);
             $this->event->trigger("beforeFilter", $wrap);
             $wrap->store();
             $this->output_as_xml($this->sql->select($this->request));
         }
     }
     $this->end_run();
 }