From 2e0b436e7369b186455c2653a235b8a350d12bd3 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 27 Jul 2021 03:38:59 +0800 Subject: [PATCH] modify --- HttpServer/Route/Router.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index da7e8d5b..d5688c49 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -635,8 +635,12 @@ class Router extends HttpService implements RouterInterface $instance = Snowflake::getDi()->get($class); $methods = Snowflake::getDi()->getMethodAttribute($class); foreach ($methods as $method => $attribute) { - var_dump($attribute); - $attribute->execute($instance, $method); + if (empty($attribute)) { + continue; + } + foreach ($attribute as $item) { + $item->execute($instance, $method); + } } } }