Esempio n. 1
0
 public function getMetadata($module, $params = array())
 {
     $metadata = array();
     $route = $this->model->getByRoute((string) $module);
     if (!empty($route)) {
         $module = call_user_func($this->registry->appliactionFactory, $route['controller']);
         $metadata = array('response' => Gliss_Reflection::runMethod($module, $route['action'], $params), 'records' => Gliss_Reflection::getConst($module, 'RECORDS'), 'record' => Gliss_Reflection::getConst($module, 'RECORD'), 'controller' => $route['controller']);
     }
     return $metadata;
 }
Esempio n. 2
0
 public function execute()
 {
     $this->router->setRoute((array) $this->request->route);
     $this->router->execute();
     if ($this->router->controller && $this->router->action) {
         $module = $this->getModule($this->router->controller);
         $params = array_merge($this->router->getParameters(), array('request' => $this->getRequest(), 'query' => $this->request->query));
         $this->afterRouter();
         $response = Gliss_Reflection::runMethod($module, $this->router->action, $params);
         $this->response = array($this->response, $this->router);
     }
     $this->response->merge($response);
     $this->response->process();
 }