mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-18 01:18:40 +00:00
Use module manager for module initialization
This commit is contained in:
parent
0e99d29b6e
commit
3397adacb2
|
|
@ -184,8 +184,13 @@ class Dispatcher
|
|||
throw new PathException($path);
|
||||
}
|
||||
|
||||
// If module controller use module manager for initialization
|
||||
if(count($split = explode('\\', $controller)) === 4) {
|
||||
$this->controllers[$controller] = $this->app->moduleManager->get($split[2]);
|
||||
} else {
|
||||
$this->controllers[$controller] = new $controller($this->app);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->controllers[$controller];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user