From 27cd78653dde4a3e6c0832411cce903a803ff633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 6 Sep 2021 16:22:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-helper/Route/Router.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/http-helper/Route/Router.php b/http-helper/Route/Router.php index 11548b5e..0c61371f 100644 --- a/http-helper/Route/Router.php +++ b/http-helper/Route/Router.php @@ -74,6 +74,19 @@ class Router extends HttpService implements RouterInterface } + /** + * @return mixed + * @throws ConfigException + * @throws Exception + */ + public static function getNamespace(): string + { + $router = Kiri::app()->getRouter(); + + return Config::get('http.namespace', $router->namespace); + } + + /** * @param bool $useTree */