From 3165a59214288beb54c4824fa0770191fdc3cf69 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Thu, 8 Apr 2021 01:15:40 +0800 Subject: [PATCH] modify --- Annotation/Loader.php | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index 7792175e..c77fc103 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -214,33 +214,7 @@ class Loader extends BaseObject public function loadByDirectory(string $path, ?string $outPath = null) { try { - - return $this->each($path); - -// foreach ($this->_fileMap as $fileName => $className) { -// if (!str_starts_with($fileName, $path)) { -// continue; -// } -// if (!isset($this->_classes[$className])) { -// continue; -// } -// -// $annotations = $this->_classes[$className]; -// if (isset($annotations['target']) && !empty($annotations['target'])) { -// foreach ($annotations['target'] as $value) { -// $value->execute([$annotations['handler']]); -// } -// } -// -// foreach ($annotations['methods'] as $name => $attribute) { -// foreach ($attribute as $value) { -// if (!($value instanceof \Annotation\Attribute)) { -// continue; -// } -// $value->execute([$annotations['handler'], $name]); -// } -// } -// } + $this->each($path); } catch (Throwable $exception) { $this->addError($exception, 'throwable'); }