public static function init() { if (defined('CURRENTLY_INSTALLING')) { return; } if (!is_file(EDUCASK_ROOT . '/site/config.xml')) { header('Location: ' . EDUCASK_WEB_ROOT . '/install.php'); exit; } if (is_readable(EDUCASK_ROOT . '/update.php')) { header('Location: ' . EDUCASK_WEB_ROOT . '/update.php'); exit; } self::registerAutoloader(); self::connectDatabase(); Session::start(); self::initializePlugins(); self::getVariables(); self::cron(); Router::moveCurrentParametersToPrevious(); Session::close(); Database::getInstance()->bootstrapDisconnect(); ObjectCache::saveInstance(); }