|
@@ -61,6 +61,24 @@
|
|
|
parent::__destruct();
|
|
|
}
|
|
|
}
|
|
|
+ public function __get(string $name){
|
|
|
+ switch($name){
|
|
|
+ case 'routes':
|
|
|
+ $routes = $this->router->routes;
|
|
|
+ foreach($this->routers as $prefix => $router){
|
|
|
+ foreach($router->routes as $route){
|
|
|
+ $routes[] = $prefix.$route;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ foreach($this->domains as $domain => $router){
|
|
|
+ foreach($router->routes as $route){
|
|
|
+ $routes[] = $domain.$route;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return $routes;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
public static function import_all(string $dirpath){
|
|
|
foreach(scandir($dirpath) as $file){
|
|
|
$path = "{$dirpath}/{$file}";
|
|
@@ -251,4 +269,4 @@
|
|
|
ini_set('display_errors', 'Off');
|
|
|
gc_enable();
|
|
|
}
|
|
|
-?>
|
|
|
+?>
|