This commit is contained in:
2023-12-18 21:30:40 +08:00
parent de670304b5
commit 4a168cb4a0
+3 -1
View File
@@ -100,12 +100,14 @@ class Scanner extends Component
if (in_array(Skip::class, $attributes) || in_array(\Attribute::class, $attributes)) { if (in_array(Skip::class, $attributes) || in_array(\Attribute::class, $attributes)) {
return; return;
} }
$object = $this->container->parse($class);
foreach ($reflect->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { foreach ($reflect->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
if ($method->isStatic() || $method->getDeclaringClass()->getName() != $class) { if ($method->isStatic() || $method->getDeclaringClass()->getName() != $class) {
continue; continue;
} }
$attributes = $method->getAttributes(); $attributes = $method->getAttributes();
if (count($attributes) > 0) {
$object = $this->container->parse($class);
}
foreach ($attributes as $attribute) { foreach ($attributes as $attribute) {
if (!class_exists($attribute->getName())) { if (!class_exists($attribute->getName())) {
continue; continue;