This commit is contained in:
as2252258@163.com
2021-05-02 04:28:05 +08:00
parent f831fa2410
commit 78980aebe2
+3 -3
View File
@@ -406,9 +406,9 @@ class Loader extends BaseObject
if (($reflect = $this->getRelect($annotations)) === null) { if (($reflect = $this->getRelect($annotations)) === null) {
continue; continue;
} }
$reflect = $reflect->newInstance(); $class = $reflect->newInstance();
foreach ($annotations['target'] ?? [] as $value) { foreach ($annotations['target'] ?? [] as $value) {
$value->execute([$reflect]); $value->execute([$class]);
} }
foreach ($annotations['methods'] as $name => $attribute) { foreach ($annotations['methods'] as $name => $attribute) {
foreach ($attribute as $value) { foreach ($attribute as $value) {
@@ -419,7 +419,7 @@ class Loader extends BaseObject
} else if ($value instanceof Set) { } else if ($value instanceof Set) {
$annotation->addSets($reflect->getName(), $value->name, $name); $annotation->addSets($reflect->getName(), $value->name, $name);
} else { } else {
$value->execute([$reflect, $name]); $value->execute([$class, $name]);
} }
} }
} }