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