From 667d311d732b293c04ac0fe3945ef54327b4b84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 12 Jan 2022 14:52:01 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- kiri-engine/Application.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kiri-engine/Application.php b/kiri-engine/Application.php index 6bf1fa15..6cb6e19d 100644 --- a/kiri-engine/Application.php +++ b/kiri-engine/Application.php @@ -230,7 +230,12 @@ class Application extends BaseApplication { fire(new OnBeforeCommandExecute()); if (!($class instanceof HotReload)) { - scan_directory(COMPONENT_PATH, 'app\Components'); + $config = Config::get('scanner', []); + if (!empty($config)) { + foreach ($config as $key => $value) { + scan_directory($value, $key); + } + } scan_directory(MODEL_PATH, 'app\Model'); }