From 2c63ee8e819f2c1f3745fcbab374389eebe614d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 15 Dec 2020 17:01:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Annotation/Annotation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index e2616ee1..b2a21519 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -83,7 +83,7 @@ class Annotation extends Component if (is_file($path)) { $explode_pop = str_replace('.php', '', $explode_pop); $annotation = $this->getReflect($namespace . '\\' . $explode_pop); - if (empty($annotation)) { + if (count($annotation) < 1) { continue; } $this->_annotations[$alias][] = $annotation; @@ -120,6 +120,8 @@ class Annotation extends Component foreach ($attributes as $attribute) { $names[$attribute->getName()] = $this->instance($attribute); } + + var_dump($reflect->getName(), $method->getName()); $tmp['handler'] = [$object, $method->getName()]; $tmp['attributes'] = $names;