This commit is contained in:
as2252258@163.com
2021-04-25 00:35:57 +08:00
parent 96bc0dface
commit 7f210e1d77
+8 -7
View File
@@ -179,14 +179,15 @@ class Response extends HttpService
private function parseData($context): mixed
{
if ($context === null) {
return '';
if (isset($this->_format_maps[$this->format])) {
$class['class'] = $this->_format_maps[$this->format];
} else {
$class['class'] = HtmlFormatter::class;
}
$format = Snowflake::createObject($class);
return $format->send($context)->getData();
}
if (isset($this->_format_maps[$this->format])) {
$className = $this->_format_maps[$this->format];
} else {
$className = HtmlFormatter::class;
}
return (new $className())->send($context)->getData();
return $context;
}
/**