예제 #1
0
파일: Backend.php 프로젝트: cheevauva/trash
 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;
 }
예제 #2
0
파일: Router.php 프로젝트: cheevauva/trash
 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();
 }
예제 #3
0
 public function getConst($const)
 {
     return Gliss_Reflection::getConst($this, $const);
 }