PHP Класс think\controller\Rest

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$method
$restDefaultMethod
$restDefaultType
$restMethodList 输出类型
$restOutputType
$restTypeList
$type 当前请求类型

Открытые методы

Метод Описание
__construct ( ) 架构函数 取得模板对象实例
_empty ( string $method ) : mixed REST 调用

Защищенные методы

Метод Описание
response ( mixed $data, String $type = 'json', integer $code = 200 ) : Response 输出返回数据

Описание методов

__construct() публичный метод

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

_empty() публичный метод

REST 调用
public _empty ( string $method ) : mixed
$method string 方法名
Результат mixed

response() защищенный метод

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

Описание свойств

$method защищенное свойство

protected $method

$restDefaultMethod защищенное свойство

protected $restDefaultMethod

$restDefaultType защищенное свойство

protected $restDefaultType

$restMethodList защищенное свойство

输出类型
protected $restMethodList

$restOutputType защищенное свойство

protected $restOutputType

$restTypeList защищенное свойство

protected $restTypeList

$type защищенное свойство

当前请求类型
protected $type