\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

$type : 

Type

$restMethodList

$restMethodList : 

Type

$restDefaultMethod

$restDefaultMethod : 

Type

$restTypeList

$restTypeList : 

Type

$restDefaultType

$restDefaultType : 

Type

$restOutputType

$restOutputType : 

Type

Methods

__construct()

__construct() 

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

_empty()

_empty(string  $method) : mixed

REST 调用

Parameters

string $method

方法名

Throws

\Exception

Returns

mixed

response()

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

输出返回数据

Parameters

mixed $data

要返回的数据

String $type

返回类型 JSON XML

integer $code

HTTP状态码

Returns

\think\Response