From ca6fa4d9a73a8b505d84e9f634c23d50c1749d56 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 23 Feb 2021 03:44:33 +0800 Subject: [PATCH] modify --- Annotation/Annotation.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index d185cd43..18728dae 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -121,6 +121,7 @@ class Annotation extends Component { try { $reflect = $this->reflectClass($class); + var_dump($reflect, $class); if (empty($reflect) || !$reflect->isInstantiable()) { return []; } @@ -218,20 +219,19 @@ class Annotation extends Component return []; } - $names = []; foreach ($attributes as $attribute) { /** @var IAnnotation $class */ $class = $this->instance($attribute); if ($class === null) { continue; } - $names[$attribute->getName()] = $class->execute([$object, $method->getName()]); + $class->execute([$object, $method->getName()]); } - $tmp['handler'] = [$object, $method->getName()]; - $tmp['attributes'] = $names; - - $this->_annotations[$alias][] = $tmp; +// $tmp['handler'] = [$object, $method->getName()]; +// $tmp['attributes'] = $names; +// +// $this->_annotations[$alias][] = $tmp; return $tmp; }