From 78980aebe22792655066788ce1409668fe9dd2cf Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sun, 2 May 2021 04:28:05 +0800 Subject: [PATCH] modify --- Annotation/Loader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index 33ea34ac..a3bf004f 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -406,9 +406,9 @@ class Loader extends BaseObject if (($reflect = $this->getRelect($annotations)) === null) { continue; } - $reflect = $reflect->newInstance(); + $class = $reflect->newInstance(); foreach ($annotations['target'] ?? [] as $value) { - $value->execute([$reflect]); + $value->execute([$class]); } foreach ($annotations['methods'] as $name => $attribute) { foreach ($attribute as $value) { @@ -419,7 +419,7 @@ class Loader extends BaseObject } else if ($value instanceof Set) { $annotation->addSets($reflect->getName(), $value->name, $name); } else { - $value->execute([$reflect, $name]); + $value->execute([$class, $name]); } } }