improve class loading

This commit is contained in:
root
2025-12-21 11:40:38 -05:00
parent 2fbddd7dbc
commit 3ffabfe3a3
6 changed files with 65 additions and 258 deletions

View File

@@ -18,6 +18,7 @@ class Server
public const ENVIRONMENT_PROD = 'prod';
protected static $kernel;
protected static $composerLoader;
public static function run() {
// Set up global error handler before anything else
@@ -67,6 +68,20 @@ class Server
return self::$kernel->folderRoot() . '/modules';
}
/**
* Set the Composer ClassLoader instance
*/
public static function setComposerLoader($loader): void {
self::$composerLoader = $loader;
}
/**
* Get the Composer ClassLoader instance
*/
public static function getComposerLoader() {
return self::$composerLoader;
}
/**
* Set up global error and exception handlers
*/