From 1436a149d18771082eb745148435b1ecdf1e1198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 31 Aug 2020 22:48:33 +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 --- system/Annotation/Annotation.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/Annotation/Annotation.php b/system/Annotation/Annotation.php index fa75f10b..cafb5b1a 100644 --- a/system/Annotation/Annotation.php +++ b/system/Annotation/Annotation.php @@ -65,7 +65,8 @@ class Annotation extends BaseAnnotation */ public function registration_notes($path, $namespace) { - foreach ($path as $item) { + $path = rtrim($path, '/'); + foreach (glob($path . '/*') as $item) { $this->scanning($item, $namespace); } } @@ -181,17 +182,16 @@ class Annotation extends BaseAnnotation /** * @param $path - * @param mixed ...$param * @return bool|mixed */ - public function runWith($path, $param) + public function runWith($path) { if (!$this->has($path)) { return null; } $callback = $this->_Scan_directory[$path]; if (!isset($this->params[$path])) { - return $callback(...$param); + return $callback(); } return $callback(...$this->params[$path]); }