This commit is contained in:
as2252258@163.com
2021-07-27 03:38:59 +08:00
parent a347b88c7c
commit 2e0b436e73
+6 -2
View File
@@ -635,8 +635,12 @@ class Router extends HttpService implements RouterInterface
$instance = Snowflake::getDi()->get($class); $instance = Snowflake::getDi()->get($class);
$methods = Snowflake::getDi()->getMethodAttribute($class); $methods = Snowflake::getDi()->getMethodAttribute($class);
foreach ($methods as $method => $attribute) { foreach ($methods as $method => $attribute) {
var_dump($attribute); if (empty($attribute)) {
$attribute->execute($instance, $method); continue;
}
foreach ($attribute as $item) {
$item->execute($instance, $method);
}
} }
} }
} }