This commit is contained in:
as2252258@163.com
2021-04-08 02:27:39 +08:00
parent a6e5d03441
commit 9df0ff168a
+2 -6
View File
@@ -356,13 +356,9 @@ class Loader extends BaseObject
if ($annotations === null) { if ($annotations === null) {
continue; continue;
} }
foreach ($annotations['target'] ?? [] as $value) {
if (isset($annotations['target']) && !empty($annotations['target'])) { $value->execute([$annotations['handler']]);
foreach ($annotations['target'] as $value) {
$value->execute([$annotations['handler']]);
}
} }
foreach ($annotations['methods'] as $name => $attribute) { foreach ($annotations['methods'] as $name => $attribute) {
foreach ($attribute as $value) { foreach ($attribute as $value) {
if (!($value instanceof \Annotation\Attribute)) { if (!($value instanceof \Annotation\Attribute)) {