From d1bd0ed5b64a84cca2c19f476bb3cb27b5aa956c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 19 Apr 2021 15:36:15 +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/Loader.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index 18d690e1..33145fb6 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -274,12 +274,9 @@ class Loader extends BaseObject */ public function appendFileToDirectory(string $filePath, string $className) { -// $array = explode('/', $filePath); -// array_pop($array); -// -// $directory = '/' . implode('/', $array); -// -// $this->_directory[$directory][] = $className; + $array = explode('/', $filePath); + array_pop($array); + $this->_directory['/' . implode('/', $array)][] = $className; $directory = $this->splitDirectory($filePath); array_pop($directory);