From 9e621b74b3987b15a25b281a9a444e723f48a2f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 9 Apr 2021 09:53:50 +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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index e6e1b7e7..a409af2e 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -242,7 +242,7 @@ class Loader extends BaseObject */ public function appendFileToDirectory(string $filePath, string $className) { - $filePath = str_replace(APP_PATH, '', $filePath); + $filePath = str_replace(directory('app'), '', $filePath); $directory = $this->splitDirectory($filePath); array_pop($directory); @@ -265,14 +265,14 @@ class Loader extends BaseObject private function each(string $filePath, ?string $output): static { $tree = null; - $filePath = str_replace(APP_PATH, '', $filePath); + $filePath = str_replace(directory('app'), '', $filePath); $directory = $this->splitDirectory($filePath); if (!empty($output)) { $output = DIRECTORY_SEPARATOR . trim($output, '/'); } - $output = str_replace(APP_PATH, '', $output); + $output = str_replace(directory('app'), '', $output); $out_path = ''; foreach ($directory as $key => $value) {