From 76e0e5a88bb48620179b1bdc47d59e4846a86823 Mon Sep 17 00:00:00 2001 From: xl Date: Wed, 22 Nov 2023 17:12:05 +0800 Subject: [PATCH] eee --- src/Response.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Response.php b/src/Response.php index 33febee..48bfa76 100644 --- a/src/Response.php +++ b/src/Response.php @@ -31,22 +31,12 @@ class Response implements ResponseInterface /** * 初始化 + * @throws */ public function __construct() { $this->contentType = \config('response.content-type', ContentType::JSON); - $this->emmit = \config('response.emmit', SwooleHttpResponseEmitter::class); - } - - /** - * @return void - * @throws ReflectionException - */ - public function init(): void - { - if (is_string($this->emmit)) { - $this->emmit = di($this->emmit); - } + $this->emmit = di(\config('response.emmit', SwooleHttpResponseEmitter::class)); }