improve class loading
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user