*/ increase_xdebug_nesting_level_to(200); /** * Set default encoding */ mb_http_output('UTF-8'); mb_internal_encoding('UTF-8'); mb_regex_encoding('UTF-8'); /** * Enable better garbage collection */ gc_enable(); // Initialise the dependency injector as soon as possible, as it is // subsequently used by some of the following code $injector = new Injector(array('locator' => 'SilverStripe\\Core\\Injector\\SilverStripeServiceConfigurationLocator')); Injector::set_inst($injector); /////////////////////////////////////////////////////////////////////////////// // MANIFEST // Regenerate the manifest if ?flush is set, or if the database is being built. // The coupling is a hack, but it removes an annoying bug where new classes // referenced in _config.php files can be referenced during the build process. $requestURL = isset($_REQUEST['url']) ? trim($_REQUEST['url'], '/') : false; $flush = isset($_GET['flush']) || $requestURL === trim(BASE_URL . '/dev/build', '/'); global $manifest; $manifest = new ClassManifest(BASE_PATH, false, $flush); // Register SilverStripe's class map autoload $loader = ClassLoader::instance(); $loader->registerAutoloader(); $loader->pushManifest($manifest); // Now that the class manifest is up, load the static configuration $configManifest = new ConfigStaticManifest();