\think\controllerRest

Summary

Methods
Properties
Constants
__construct()
_empty()
No public properties found
No constants found
response()
$method
$type
$restMethodList
$restDefaultMethod
$restTypeList
$restDefaultType
$restOutputType
N/A
No private methods found
No private properties found
N/A

Properties

$method

$method

$type

$type

$restMethodList

$restMethodList

$restDefaultMethod

$restDefaultMethod

$restTypeList

$restTypeList

$restDefaultType

$restDefaultType

$restOutputType

$restOutputType

Methods

__construct()

__construct() : mixed

构造函数 取得模板对象实例

Returns

mixed —

_empty()

_empty(string  $method) : mixed

REST 调用

Parameters

string $method

方法名

Throws

\Exception

Returns

mixed —

response()

response(mixed  $data, string  $type = 'json', int  $code = 200) : \think\Response

输出返回数据

Parameters

mixed $data

要返回的数据

string $type

返回类型 JSON XML

int $code

HTTP状态码

Returns

\think\Response —