From 2507c49e6799056d4a749204080ff0b73b0d4fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 4 Aug 2021 16:27:23 +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/Application.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/System/Application.php b/System/Application.php index 9cbe10eb..7d3524ca 100644 --- a/System/Application.php +++ b/System/Application.php @@ -16,6 +16,7 @@ use Console\ConsoleProviders; use Database\DatabasesProviders; use Exception; use HttpServer\Command; +use HttpServer\Http\Response; use HttpServer\ServerProviders; use Snowflake\Abstracts\BaseApplication; use Snowflake\Abstracts\Config; @@ -144,9 +145,9 @@ class Application extends BaseApplication if (!($class instanceof Command)) { scan_directory(directory('app'), 'App'); } - $data = response()->getBuilder($manager->execCommand($class)); + $data = di(Response::class)->getBuilder($manager->execCommand($class)); } catch (\Throwable $exception) { - $data = response()->getBuilder(logger()->exception($exception)); + $data = di(Response::class)->getBuilder(logger()->exception($exception)); } finally { print_r($data); Timer::clearAll();