| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class Json extends Response |
||
| 22 | { |
||
| 23 | // 输出参数 |
||
| 24 | protected $options = [ |
||
| 25 | 'json_encode_param' => JSON_UNESCAPED_UNICODE, |
||
| 26 | ]; |
||
| 27 | |||
| 28 | protected $contentType = 'application/json'; |
||
| 29 | |||
| 30 | public function __construct(Cookie $cookie, $data = '', int $code = 200) |
||
|
|
|||
| 31 | { |
||
| 32 | parent::__construct($cookie, $data, $code); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * 处理数据 |
||
| 37 | * @access protected |
||
| 38 | * @param mixed $data 要处理的数据 |
||
| 39 | * @return string |
||
| 40 | * @throws \Exception |
||
| 41 | */ |
||
| 42 | protected function output($data): string |
||
| 58 | } |
||
| 59 | } |
||
| 62 |