modify
This commit is contained in:
@@ -172,6 +172,9 @@ class Loader extends BaseObject
|
||||
}
|
||||
|
||||
$replace = Snowflake::getDi()->getReflect($this->explodeFileName($path, $namespace));
|
||||
|
||||
var_dump($replace->getName() . '::' . $replace->getAttributes(Target::class));
|
||||
|
||||
if (empty($replace) || !$replace->getAttributes(Target::class)) {
|
||||
return;
|
||||
}
|
||||
@@ -398,13 +401,12 @@ class Loader extends BaseObject
|
||||
if ($annotations === null) {
|
||||
continue;
|
||||
}
|
||||
$handler = $annotations['handler']->newInstance();
|
||||
foreach ($annotations['target'] ?? [] as $value) {
|
||||
$value->execute([$handler]);
|
||||
$value->execute([$annotations['handler']]);
|
||||
}
|
||||
foreach ($annotations['methods'] as $name => $attribute) {
|
||||
foreach ($attribute as $value) {
|
||||
$value->execute([$handler, $name]);
|
||||
$value->execute([$annotations['handler'], $name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user