$ret
$ret : integer
PhalApi_Response_Json JSON响应类
setRet(integer $ret) : \PhalApi_Response
Set the response status
integer | $ret | response status, such as: 2xx, 4xx, 5xx |
setData(\array/string $data) : \PhalApi_Response
Set the response data
\array/string | $data | result data to client, we suggest return array data, not string data |
setMsg(string $msg) : \PhalApi_Response
Set the error message
string | $msg | error message |
setDebug(string $key, mixed $value) : \PhalApi_Response
Set debug infomation
string | $key | debug key |
mixed | $value | debug data |