This commit is contained in:
2021-06-08 11:38:55 +08:00
parent 07c2b3f6cf
commit e576af2071
+3 -3
View File
@@ -354,12 +354,12 @@ class Node extends HttpService
public function annotationInject(string $className, string $action): Node public function annotationInject(string $className, string $action): Node
{ {
$annotation = annotation()->getMethods($className, $action); $annotation = annotation()->getMethods($className, $action);
if (empty($annotation)) {
return $this;
}
if ($action == 'xiaqi') { if ($action == 'xiaqi') {
var_export($annotation); var_export($annotation);
} }
if (empty($annotation)) {
return $this;
}
foreach ($annotation as $attribute) { foreach ($annotation as $attribute) {
if ($attribute instanceof Interceptor) { if ($attribute instanceof Interceptor) {
$this->addInterceptor($attribute->interceptor); $this->addInterceptor($attribute->interceptor);