![]() |
Bearsampp 2026.7.11
|
Static Public Member Functions | |
| static | isLoaded ($module) |
| static | isLoading ($module) |
| static | loadAsync ($module, callable $loader) |
| static | loadSync ($module, callable $loader) |
| static | markLoaded ($module) |
| static | waitForModule ($module, $timeout=5000) |
Data Fields | |
| const | APPS = 'apps' |
| const | BINS = 'bins' |
| const | CONFIG = 'config' |
| const | CORE = 'core' |
| const | HOMEPAGE = 'homepage' |
| const | LANG = 'lang' |
| const | OPENSSL = 'openssl' |
| const | REGISTRY = 'registry' |
| const | TOOLS = 'tools' |
| const | WINBINDER = 'winbinder' |
Static Private Member Functions | |
| static | loadInBackground ($module, callable $loader) |
Static Private Attributes | |
| static | $loading = array() |
| static | $maxWaitTime = 5000 |
| static | $modules = array() |
Class ModuleLoader
Manages asynchronous loading of non-critical modules. Critical modules (Core, Config, Lang, Bins) load synchronously. Non-critical modules (Apps, Tools, Registry, Homepage) load in background.
Definition at line 16 of file class.moduleloader.php.
|
static |
Check if a module is loaded
| string | $module | Module name |
Definition at line 133 of file class.moduleloader.php.
|
static |
Check if a module is currently loading
| string | $module | Module name |
Definition at line 144 of file class.moduleloader.php.
|
static |
Queue a module for background loading (non-blocking)
| string | $module | Module name |
| callable | $loader | Callback that loads the module |
Definition at line 57 of file class.moduleloader.php.
References Log\debug(), and loadInBackground().
Referenced by Root\loadAppsAsync(), Root\loadHomepageAsync(), Root\loadRegistryAsync(), and Root\loadToolsAsync().
|
staticprivate |
Attempt to load module in background process
| string | $module | Module name |
| callable | $loader | Loader callback |
Definition at line 81 of file class.moduleloader.php.
Referenced by loadAsync().
|
static |
Load a module synchronously (blocking)
| string | $module | Module name |
| callable | $loader | Callback that loads the module |
Definition at line 40 of file class.moduleloader.php.
References Log\debug().
|
static |
Mark a module as loaded
| string | $module | Module name |
Definition at line 121 of file class.moduleloader.php.
|
static |
Wait for a module to finish loading (blocking) Used when code needs a module that may be loading asynchronously
| string | $module | Module name |
| int | $timeout | Maximum wait time in milliseconds |
Definition at line 99 of file class.moduleloader.php.
References Log\error().
Referenced by Root\ensureModuleLoaded().
|
staticprivate |
Definition at line 19 of file class.moduleloader.php.
|
staticprivate |
Definition at line 20 of file class.moduleloader.php.
|
staticprivate |
Definition at line 18 of file class.moduleloader.php.
| const APPS = 'apps' |
Definition at line 28 of file class.moduleloader.php.
Referenced by Root\loadAppsAsync(), and Root\loadAppsFiber().
| const BINS = 'bins' |
Definition at line 26 of file class.moduleloader.php.
| const CONFIG = 'config' |
Definition at line 23 of file class.moduleloader.php.
| const CORE = 'core' |
Definition at line 22 of file class.moduleloader.php.
| const HOMEPAGE = 'homepage' |
Definition at line 31 of file class.moduleloader.php.
Referenced by Root\loadHomepageAsync(), and Root\loadHomepageFiber().
| const LANG = 'lang' |
Definition at line 24 of file class.moduleloader.php.
| const OPENSSL = 'openssl' |
Definition at line 25 of file class.moduleloader.php.
| const REGISTRY = 'registry' |
Definition at line 30 of file class.moduleloader.php.
Referenced by Root\loadRegistryAsync(), and Root\loadRegistryFiber().
| const TOOLS = 'tools' |
Definition at line 27 of file class.moduleloader.php.
Referenced by Root\loadToolsAsync(), and Root\loadToolsFiber().
| const WINBINDER = 'winbinder' |
Definition at line 29 of file class.moduleloader.php.