first gestalt
This commit is contained in:
@ -7,6 +7,7 @@ namespace kernel;
|
||||
use kernel\helpers\Debug;
|
||||
use kernel\modules\user\models\User;
|
||||
use kernel\services\ModuleService;
|
||||
use kernel\services\ThemeService;
|
||||
use Phroute\Phroute\Dispatcher;
|
||||
|
||||
class App
|
||||
@ -24,6 +25,8 @@ class App
|
||||
|
||||
public ModuleService $moduleService;
|
||||
|
||||
public ThemeService $themeService;
|
||||
|
||||
public static Database $db;
|
||||
|
||||
public function run(): void
|
||||
@ -39,6 +42,7 @@ class App
|
||||
public function load(): static
|
||||
{
|
||||
$this->moduleService = new ModuleService();
|
||||
$this->themeService = new ThemeService();
|
||||
App::$collector = new CgRouteCollector();
|
||||
$this->setRouting();
|
||||
|
||||
@ -53,6 +57,10 @@ class App
|
||||
foreach ($modules_routs as $rout){
|
||||
include "$rout";
|
||||
}
|
||||
$activeTheme = getConst($this->themeService->getActiveTheme());
|
||||
if (!empty($activeTheme)){
|
||||
include $activeTheme . "/" . $this->themeService->getThemeRout($activeTheme);
|
||||
}
|
||||
}
|
||||
|
||||
public static function create(): App
|
||||
|
Reference in New Issue
Block a user