modify
This commit is contained in:
@@ -179,14 +179,15 @@ class Response extends HttpService
|
|||||||
private function parseData($context): mixed
|
private function parseData($context): mixed
|
||||||
{
|
{
|
||||||
if ($context === null) {
|
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])) {
|
return $context;
|
||||||
$className = $this->_format_maps[$this->format];
|
|
||||||
} else {
|
|
||||||
$className = HtmlFormatter::class;
|
|
||||||
}
|
|
||||||
return (new $className())->send($context)->getData();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user