Beispiel #1
0
 /**
  * Carga la acción en memoria
  */
 public static function checkAction()
 {
     $mainAppController = new \App\Main();
     $mainAppController->beforeController();
     $mainController = new \Supernova\Controller();
     $namespace = self::$namespace;
     $actionClass = new $namespace();
     if (method_exists($namespace, "execute" . self::$elements['prefix'] . self::$elements['action'])) {
         call_user_func_array(array($actionClass, "execute" . self::$elements['prefix'] . self::$elements['action']), self::$request['get']);
     } else {
         if (method_exists($namespace, "execute" . self::$elements['action'])) {
             call_user_func_array(array($actionClass, "execute" . self::$elements['action']), self::$request['get']);
         } else {
             debug(__("Action not exist:") . " <strong>execute" . self::$elements['action'] . "</strong> " . __("in controller:") . " <strong>" . $namespace . "</strong>");
             \Supernova\View::callError(404);
         }
     }
     $mainAppController->afterController();
     \Supernova\View::render();
 }