begin("Bootstrap"); $_tracer->begin("Opening core files"); $_shm_files = array_merge( zglob("core/*.php"), zglob("core/{".ENABLED_MODS."}/*.php"), zglob("ext/*/info.php") ); foreach ($_shm_files as $_shm_filename) { if (basename($_shm_filename)[0] != "_") { require_once $_shm_filename; } } unset($_shm_files); unset($_shm_filename); $_tracer->end(); $_tracer->begin("Loading extension info"); ExtensionInfo::load_all_extension_info(); Extension::determine_enabled_extensions(); $_tracer->end(); $_tracer->begin("Opening enabled extension files"); $_shm_files = zglob("ext/{".Extension::get_enabled_extensions_as_string()."}/main.php"); foreach ($_shm_files as $_shm_filename) { if (basename($_shm_filename)[0] != "_") { require_once $_shm_filename; } } unset($_shm_files); unset($_shm_filename); $_tracer->end(); // connect to the database $_tracer->begin("Connecting to DB"); $database = new Database(); $config = new DatabaseConfig($database); $_tracer->end(); // load the theme parts $_tracer->begin("Loading themelets"); foreach (_get_themelet_files(get_theme()) as $themelet) { require_once $themelet; } unset($themelet); $page = class_exists("CustomPage") ? new CustomPage() : new Page(); $_tracer->end(); // hook up event handlers $_tracer->begin("Loading event listeners"); _load_event_listeners(); $_tracer->end(); send_event(new InitExtEvent()); $_tracer->end();