PHP 클래스 think\controller\Rest

파일 보기 프로젝트 열기: top-think/framework

보호된 프로퍼티들

프로퍼티 타입 설명
$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