This commit is contained in:
2025-08-01 14:29:50 +03:00
parent 2ab819ff30
commit b86b8ff923
54 changed files with 1512 additions and 672 deletions

View File

@@ -5,6 +5,7 @@ namespace kernel;
use kernel\helpers\Debug;
use kernel\modules\notification\NotificationDispatcher;
use kernel\modules\user\models\User;
use kernel\services\ModuleService;
use kernel\services\ThemeService;
@@ -21,10 +22,14 @@ class App
static User $user;
static NotificationDispatcher $notificationDispatcher;
static array $secure;
public ModuleService $moduleService;
static Hook $hook;
public ThemeService $themeService;
public static Database $db;
@@ -41,6 +46,7 @@ class App
public function load(): static
{
App::$hook = new Hook();
$this->moduleService = new ModuleService();
App::$collector = new CgRouteCollector();
$this->setRouting();
@@ -53,6 +59,7 @@ class App
include KERNEL_DIR . "/routs/admin.php";
include ROOT_DIR . "/rout.php";
$modules_routs = $this->moduleService->getModulesRouts();
$this->moduleService->setModulesHooks();
foreach ($modules_routs as $rout){
include "$rout";
}