This commit is contained in:
2020-10-30 10:53:20 +08:00
parent 5fc484640a
commit 68a243f9cf
+34
View File
@@ -84,6 +84,40 @@ class Response extends Application
}
}
/**
* @param $content
* @return mixed
*/
public function toHtml($content)
{
$this->format = self::HTML;
return $content;
}
/**
* @param $content
* @return mixed
*/
public function toJson($content)
{
$this->format = self::JSON;
return $content;
}
/**
* @param $content
* @return mixed
*/
public function toXml($content)
{
$this->format = self::XML;
return $content;
}
/**
* @return mixed
* @throws Exception