modify
This commit is contained in:
@@ -177,7 +177,7 @@ class Loader extends BaseObject
|
||||
}
|
||||
$this->appendFileToDirectory($path->getRealPath(), $replace->getName());
|
||||
|
||||
$_array = ['handler' => $replace->newInstanceWithoutConstructor(), 'target' => [], 'methods' => [], 'property' => []];
|
||||
$_array = ['handler' => $replace, 'target' => [], 'methods' => [], 'property' => []];
|
||||
foreach ($replace->getAttributes() as $attribute) {
|
||||
if ($attribute->getName() == Attribute::class) {
|
||||
continue;
|
||||
@@ -398,12 +398,13 @@ class Loader extends BaseObject
|
||||
if ($annotations === null) {
|
||||
continue;
|
||||
}
|
||||
$handler = $annotations['handler']->newInstance();
|
||||
foreach ($annotations['target'] ?? [] as $value) {
|
||||
$value->execute([$annotations['handler']]);
|
||||
$value->execute([$handler]);
|
||||
}
|
||||
foreach ($annotations['methods'] as $name => $attribute) {
|
||||
foreach ($attribute as $value) {
|
||||
$value->execute([$annotations['handler'], $name]);
|
||||
$value->execute([$handler, $name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user