Files
kiri-core/Server/Constrict/Response.php
T

34 lines
445 B
PHP
Raw Normal View History

2021-08-04 02:43:28 +08:00
<?php
2021-08-04 14:05:00 +08:00
namespace Server\Constrict;
2021-08-04 02:43:28 +08:00
use HttpServer\Http\Context;
2021-08-04 02:53:35 +08:00
use HttpServer\Http\Response as HttpResponse;
2021-08-04 02:43:28 +08:00
/**
* Class Response
* @package Server
2021-08-04 10:16:03 +08:00
* @mixin HttpResponse
2021-08-04 02:43:28 +08:00
*/
class Response
{
2021-08-04 10:16:03 +08:00
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);
}
2021-08-04 02:43:28 +08:00
}