This commit is contained in:
2021-02-22 19:36:40 +08:00
parent beb7a94678
commit 8fb5928747
+12 -8
View File
@@ -144,16 +144,20 @@ class Annotation extends Component
private function resolveMethod(ReflectionClass $reflect, $class, $alias, $object) private function resolveMethod(ReflectionClass $reflect, $class, $alias, $object)
{ {
var_dump($reflect->getName()); var_dump($reflect->getName());
foreach ($reflect->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { try {
if ($method->class != $class) { foreach ($reflect->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
continue; if ($method->class != $class) {
} continue;
}
$tmp = $this->resolveAnnotations($method, $alias, $object); $tmp = $this->resolveAnnotations($method, $alias, $object);
if (empty($tmp)) { if (empty($tmp)) {
continue; continue;
}
$this->_classes[$reflect->getName()][$method->getName()] = $tmp;
} }
$this->_classes[$reflect->getName()][$method->getName()] = $tmp; } catch (\Throwable $throwable) {
$this->addError($throwable);
} }
$this->resolveProperty($reflect, $object); $this->resolveProperty($reflect, $object);
} }