PHP Class think\controller\Rest

显示文件 Open project: top-think/framework

Protected Properties

Property Type Description
$method
$restDefaultMethod
$restDefaultType
$restMethodList 输出类型
$restOutputType
$restTypeList
$type 当前请求类型

Public Methods

Method Description
__construct ( ) 架构函数 取得模板对象实例
_empty ( string $method ) : mixed REST 调用

Protected Methods

Method Description
response ( mixed $data, String $type = 'json', integer $code = 200 ) : Response 输出返回数据

Method Details

__construct() public method

架构函数 取得模板对象实例
public __construct ( )

_empty() public method

REST 调用
public _empty ( string $method ) : mixed
$method string 方法名
return mixed

response() protected method

输出返回数据
protected response ( mixed $data, String $type = 'json', integer $code = 200 ) : Response
$data mixed 要返回的数据
$type String 返回类型 JSON XML
$code integer HTTP状态码
return think\Response

Property Details

$method protected_oe property

protected $method

$restDefaultMethod protected_oe property

protected $restDefaultMethod

$restDefaultType protected_oe property

protected $restDefaultType

$restMethodList protected_oe property

输出类型
protected $restMethodList

$restOutputType protected_oe property

protected $restOutputType

$restTypeList protected_oe property

protected $restTypeList

$type protected_oe property

当前请求类型
protected $type