bootstrap as its own phase
This commit is contained in:
parent
b158901f53
commit
f0326dc3ab
2 changed files with 6 additions and 5 deletions
|
@ -17,6 +17,7 @@ _version_check();
|
|||
_sanitise_environment();
|
||||
|
||||
// load base files
|
||||
$_shm_ctx->log_start("Bootstrap");
|
||||
$_shm_ctx->log_start("Opening files");
|
||||
$_shm_files = array_merge(
|
||||
zglob("core/*.php"),
|
||||
|
@ -48,5 +49,9 @@ $page = class_exists("CustomPage") ? new CustomPage() : new Page();
|
|||
$_shm_ctx->log_endok();
|
||||
|
||||
// hook up event handlers
|
||||
$_shm_ctx->log_start("Loading extensions");
|
||||
_load_event_listeners();
|
||||
$_shm_ctx->log_endok();
|
||||
|
||||
send_event(new InitExtEvent());
|
||||
$_shm_ctx->log_endok();
|
||||
|
|
|
@ -9,9 +9,7 @@ $_shm_event_listeners = [];
|
|||
|
||||
function _load_event_listeners(): void
|
||||
{
|
||||
global $_shm_event_listeners, $_shm_ctx;
|
||||
|
||||
$_shm_ctx->log_start("Loading extensions");
|
||||
global $_shm_event_listeners;
|
||||
|
||||
$cache_path = data_path("cache/shm_event_listeners.php");
|
||||
if (COMPILE_ELS && file_exists($cache_path)) {
|
||||
|
@ -23,8 +21,6 @@ function _load_event_listeners(): void
|
|||
_dump_event_listeners($_shm_event_listeners, $cache_path);
|
||||
}
|
||||
}
|
||||
|
||||
$_shm_ctx->log_endok();
|
||||
}
|
||||
|
||||
function _set_event_listeners(): void
|
||||
|
|
Reference in a new issue