first gestalt

This commit is contained in:
2025-01-15 15:04:34 +03:00
parent 64dad0aaf9
commit fe2ed9d789
80 changed files with 1139 additions and 2 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
@ -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