This commit is contained in:
2021-08-04 14:05:00 +08:00
parent 24b0f8d944
commit e479529347
3 changed files with 10 additions and 12 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace Server\Constrict;
use HttpServer\Http\Context;
use HttpServer\Http\Response as HttpResponse;
/**
* Class Response
* @package Server
* @mixin HttpResponse
*/
class Response
{
const JSON = 'json';
const XML = 'xml';
const HTML = 'html';
/**
* @param $name
* @param $args
* @return mixed
*/
public function __call($name, $args)
{
return Context::getContext(HttpResponse::class)->{$name}(...$args);
}
}