$namespace) { $matches = null; if (preg_match("#$pattern#", $uri, $matches)) { # Pattern matched! Moving on to the proper View... array_shift($matches); require_once($GLOBALS['rootpath']."okapi/views/$namespace.php"); $response = call_user_func_array(array('\\okapi\\views\\'. str_replace('/', '\\', $namespace).'\\View', 'call'), $matches); if ($response) $response->display(); return; } } } catch (Http404 $e) { /* pass */ } # None of the patterns matched OR method threw the Http404 exception. require_once($GLOBALS['rootpath']."okapi/views/http404.php"); $response = \okapi\views\http404\View::call(); $response->display(); } } Okapi::gettext_domain_init(); OkapiScriptEntryPointController::dispatch_request($_SERVER['REQUEST_URI']); Okapi::gettext_domain_restore();