$start1 = microtime(true); // initializes the campsite object $campsite = new CampSite(); $start2 = microtime(true); // loads site configuration settings $campsite->loadConfiguration(CS_PATH_CONFIG . DIR_SEP . 'configuration.php'); $start3 = microtime(true); // starts the session $campsite->initSession(); if (file_exists(CS_PATH_SITE . DIR_SEP . 'conf' . DIR_SEP . 'upgrading.php')) { camp_upgrade(); exit(0); } // checking whether it is a statistics (js based) request $stats_only = false; $campsite->processStats($stats_only); if ($stats_only) { exit(0); } $start4 = microtime(true); // initiates the context $campsite->init(); $start5 = microtime(true); // dispatches campsite $campsite->dispatch(); $start6 = microtime(true); // triggers an event before render the page. // looks for preview language if any. $previewLang = $campsite->event('beforeRender'); if (!is_null($previewLang)) { require_once $GLOBALS['g_campsiteDir'] . '/template_engine/classes/SyntaxError.php';