/** This method is the main controller */ public static function serveWeb() { if (Config::get('PROFILING_ENABLED')) { Profiling::start('index'); } $url = $_SERVER['REQUEST_URI']; $hash = md5($url); if (!@(include 'cache/' . $hash)) { Router::setUrl($url); switch (Router::$node->getProperty('type')) { case 'page': case 'root': ControllerPage::compile(); break; case 'php': ControllerPhp::compile(); break; } } if (Config::get('PROFILING_ENABLED')) { Profiling::end(); } }