Beispiel #1
0
 public function serve($redirect_url)
 {
     $aci = ResolveURL::resolveControllerIMAG($redirect_url);
     $action_controller = $aci['act_contr'];
     $_SESSION['imag_id'] = $aci['imag_id'];
     $controllerClass = ResolveURL::controllerClassName($action_controller['controller']);
     $controllerFile = ResolveURL::getControllerFile($action_controller['controller']);
     if (file_exists($controllerFile)) {
         require_once $controllerFile;
         $callController = new $controllerClass();
         $action = $action_controller['action'];
         if (method_exists($callController, $action)) {
             $callController->{$action}();
         } else {
             $this->handleError();
         }
     } else {
         $this->handleError();
     }
 }