<?php define('FLUIDFRAME', true); define('INSTALLDIR', dirname(__FILE__)); require_once INSTALLDIR . '/lib/core.php'; try { Fluidframe::init(); $_lang = common_language(); } catch (Exception $e) { common_error($e->getTraceAsString()); $error = new ErrorAction('en'); $error->setErrorMessage(500, $e->getMessage()); $error->handle(); } // get the incoming request URL path $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); // get the route based on the path and server $route = $router->match($path, $_SERVER); if (empty($route)) { $error = new ErrorAction($_lang); $error->setErrorMessage(404, 'Unkown page'); $error->handle(); } // does the route indicate an action? if (isset($route->params['action'])) { // take the action class directly from the route $action = $route->params['action']; } else { // use a default action class $action = 'home'; }
private static function loadConfig() { Fluidframe::loadConfigFile(); }