/**
  * Entry point for xanthin application framework
  */
 function main()
 {
     xTimer::start('script_execution_time');
     ob_start();
     $this->initDatabase();
     $this->initSession();
     $this->initModules();
     xanth_fix_gpc_magic();
     //error handler
     set_error_handler('xanth_php_error_handler');
     // Setting the Content-Type header with charset
     header('Content-Type: text/html; charset=utf-8');
     $this->m_module_manager->invoke('xh_createDocument');
     $this->finalModules();
     $this->finalSession();
     $this->finalDatabase();
     ob_end_flush();
     if (xConf::get('debug', false)) {
         $db =& xDB::getDB();
         echo xLogEntry::renderFromScreen();
         echo '<br><br><br>Execution Time: ' . xTimer::stop('script_execution_time') . ' Queries: ' . var_export($db->dumpGet(), true);
     }
 }
 /**
  * @static
  */
 function start($name)
 {
     global $g_execution_started;
     $g_execution_started[$name] = xTimer::_getmicrotime();
 }