This commit is contained in:
2021-02-23 14:31:16 +08:00
parent f36ceb77de
commit dad53e797e
2 changed files with 13 additions and 27 deletions
+2 -1
View File
@@ -72,10 +72,11 @@ class Middleware
}
[$controller, $action] = $node->handler;
$attributes = Snowflake::app()->getAttributes();
$annotation = $attributes->getAnnotationByMethod($controller, $action, 'controllers');
$annotation = $attributes->getAnnotationByMethod($controller, $action);
if (count($annotation) < 1) {
return;
}
var_dump(count($annotation));
foreach ($annotation as $attribute) {
if ($attribute instanceof Interceptor) {
$node->addInterceptor($attribute->interceptor);