This commit is contained in:
as2252258@163.com
2021-04-24 17:05:52 +08:00
parent b6c0619a2e
commit 7e348cc1ca
+3 -4
View File
@@ -182,12 +182,11 @@ class Response extends HttpService
return ''; return '';
} }
if (isset($this->_format_maps[$this->format])) { if (isset($this->_format_maps[$this->format])) {
$config['class'] = $this->_format_maps[$this->format]; $className = $this->_format_maps[$this->format];
} else { } else {
$config['class'] = HtmlFormatter::class; $className = HtmlFormatter::class;
} }
$formatter = Snowflake::createObject($config); return (new $className())->send($context)->getData();
return $formatter->send($context)->getData();
} }
/** /**