Exemplo n.º 1
0
 public function __call($ps_table, $pa_args)
 {
     $vo_service = new SearchJSONService($this->request, $ps_table);
     $va_content = $vo_service->dispatch();
     if (intval($this->request->getParameter("pretty", pInteger)) > 0) {
         $this->view->setVar("pretty_print", true);
     }
     if ($vo_service->hasErrors()) {
         $this->view->setVar("errors", $vo_service->getErrors());
         $this->render("json_error.php");
     } else {
         $this->view->setVar("content", $va_content);
         $this->render("json.php");
     }
 }