eee
This commit is contained in:
+4
-1
@@ -93,11 +93,14 @@ class Scanner extends Component
|
|||||||
if (class_exists($class)) {
|
if (class_exists($class)) {
|
||||||
$reflect = $this->container->getReflectionClass($class);
|
$reflect = $this->container->getReflectionClass($class);
|
||||||
if ($reflect->isInstantiable()) {
|
if ($reflect->isInstantiable()) {
|
||||||
|
if ($reflect->isTrait() || $reflect->isEnum()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$attributes = $this->skipNames($reflect);
|
$attributes = $this->skipNames($reflect);
|
||||||
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);
|
$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;
|
||||||
|
|||||||
Reference in New Issue
Block a user