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 '';
}
if (isset($this->_format_maps[$this->format])) {
$config['class'] = $this->_format_maps[$this->format];
$className = $this->_format_maps[$this->format];
} else {
$config['class'] = HtmlFormatter::class;
$className = HtmlFormatter::class;
}
$formatter = Snowflake::createObject($config);
return $formatter->send($context)->getData();
return (new $className())->send($context)->getData();
}
/**