This commit is contained in:
2021-01-19 18:30:25 +08:00
parent 34c59de7a2
commit 92836d9976
+5
View File
@@ -5,6 +5,7 @@ namespace Annotation;
use Annotation\Model\Get; use Annotation\Model\Get;
use Database\ActiveRecord;
use ReflectionAttribute; use ReflectionAttribute;
use ReflectionClass; use ReflectionClass;
use ReflectionException; use ReflectionException;
@@ -110,6 +111,10 @@ class Annotation extends Component
if ($reflect->isInstantiable()) { if ($reflect->isInstantiable()) {
$object = $reflect->newInstance(); $object = $reflect->newInstance();
foreach ($reflect->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { foreach ($reflect->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
if ($method->class != $class) {
continue;
}
$tmp = $this->resolveAnnotations($method, $alias, $object); $tmp = $this->resolveAnnotations($method, $alias, $object);
$this->_classes[$reflect->getName()][$method->getName()] = $tmp; $this->_classes[$reflect->getName()][$method->getName()] = $tmp;