示例#1
0
文件: Main.class.php 项目: fulldump/8
 /** 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();
     }
 }