This commit is contained in:
2021-09-07 11:44:12 +08:00
parent 0cdb8c5b20
commit 86880f8b1f
5 changed files with 11 additions and 17 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ class Router extends HttpService implements RouterInterface
*/
public static function getNamespace(): string
{
$router = Kiri::app()->getRouter();
$router = Kiri::getDi()->get(Router::class);
return Config::get('http.namespace', $router->namespace);
}
@@ -96,7 +96,7 @@ class Router extends HttpService implements RouterInterface
* @param $handler
* @param string $method
* @return ?Node
* @throws Exception
* @throws
*/
public function addRoute($path, $handler, string $method = 'any'): ?Node
{