Browse Source

Set controller in Core class

Alan Lam 7 năm trước cách đây
mục cha
commit
3c2ca51449
2 tập tin đã thay đổi với 3 bổ sung và 0 xóa
  1. 2 0
      engine/core.php
  2. 1 0
      router.php

+ 2 - 0
engine/core.php

@@ -5,6 +5,8 @@ class Core {
 	public static $user = null;
 	public static $admin = false;
 
+	public static $controller = "404";
+
 	public static $breadcrumbs = [];
 
 	public static $use_default_container = true;

+ 1 - 0
router.php

@@ -18,6 +18,7 @@ try {
 
 			// Get controller
 			$controller = $options["controller"];
+			Core::$controller = $controller;
 
 			// Get route type
 			$route_type = $options["type"] ?? "page";