kernel v0.1.4

This commit is contained in:
2025-01-21 16:51:29 +03:00
parent b733a49738
commit 2664f7fd78
35 changed files with 1249 additions and 82 deletions

View File

@ -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
@ -53,6 +56,12 @@ class App
foreach ($modules_routs as $rout){
include "$rout";
}
$themeService = new ThemeService();
$activeTheme = getConst($themeService->getActiveTheme());
if (!empty($activeTheme)){
include $activeTheme . "/" . $themeService->getThemeRout($activeTheme);
}
}
public static function create(): App