HttpGet ('Controller')->Text (); $Action = $Request->HttpGet ('Action')->Text (); $Args = $Request->HttpRequest ('Args')->Text () ? : []; $ControllerPath = "controllers/{$ControllerName}.php"; $ModelPath = "models/{$ControllerName}.php"; if (file_exists ($ControllerPath) && file_exists ($ModelPath)) { $RBAC = new SimpleRBAC ($DB, $_UserAccess, $_UserRole); require_once ($ControllerPath); $ControllerClassName = $ControllerName . 'Controller'; $Controller = new $ControllerClassName ( ModelManager::GetInstance($DB)->GetModel($ControllerName) ); if ($RBAC->IsAllowed ($Controller, $Action . APP_CONTROLLER_METHOD_SUFFIX)) { echo $Controller->Action ( $Action, $Request, $Args ); } else { Header ('HTTP/1.0 403 Forbidden'); exit (); } } ?>