fembooru/core/_bootstrap.php

27 lines
806 B
PHP
Raw Normal View History

2020-01-26 13:19:35 +00:00
<?php declare(strict_types=1);
/*
* Load all the files into memory, sanitise the environment, but don't
* actually do anything as far as the app is concerned
*/
2020-01-27 19:05:43 +00:00
global $cache, $config, $database, $user, $page, $_tracer;
2015-08-02 19:29:25 +01:00
require_once "core/sys_config.php";
require_once "core/polyfills.php";
require_once "core/util.php";
2016-05-11 23:27:42 +01:00
require_once "vendor/autoload.php";
_sanitise_environment();
2019-07-05 20:49:47 +01:00
$_tracer->begin("Bootstrap");
2020-01-27 19:05:43 +00:00
_load_core_files();
$cache = new Cache(CACHE_DSN);
2020-01-27 18:24:11 +00:00
$database = new Database(DATABASE_DSN);
2019-09-29 14:50:31 +01:00
$config = new DatabaseConfig($database);
ExtensionInfo::load_all_extension_info();
Extension::determine_enabled_extensions();
2020-01-27 18:24:11 +00:00
require_all(zglob("ext/{".Extension::get_enabled_extensions_as_string()."}/main.php"));
2020-01-27 19:05:43 +00:00
_load_theme_files();
$page = new Page();
2015-08-02 20:54:41 +01:00
_load_event_listeners();
2019-07-05 20:49:47 +01:00
$_tracer->end();