PHP 클래스 yii\rest\Controller

Controller implements the following steps in a RESTful API request handling cycle: 1. Resolving response format (see [[ContentNegotiator]]); 2. Validating request method (see Controller::verbs). 3. Authenticating user (see [[\yii\filters\auth\AuthInterface]]); 4. Rate limiting (see [[RateLimiter]]); 5. Formatting response data (see Controller::serializeData). For more details and usage information on Controller, see the guide article on rest controllers.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\web\Controller
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$enableCsrfValidation
$serializer the configuration for creating the serializer that formats the response data.

공개 메소드들

메소드 설명
afterAction ( $action, $result )
behaviors ( )

보호된 메소드들

메소드 설명
serializeData ( mixed $data ) : mixed Serializes the specified data.
verbs ( ) : array Declares the allowed HTTP verbs.

메소드 상세

afterAction() 공개 메소드

public afterAction ( $action, $result )

behaviors() 공개 메소드

public behaviors ( )

serializeData() 보호된 메소드

The default implementation will create a serializer based on the configuration given by [[serializer]]. It then uses the serializer to serialize the given data.
protected serializeData ( mixed $data ) : mixed
$data mixed the data to be serialized
리턴 mixed the serialized data.

verbs() 보호된 메소드

Please refer to [[VerbFilter::actions]] on how to declare the allowed verbs.
protected verbs ( ) : array
리턴 array the allowed HTTP verbs.

프로퍼티 상세

$enableCsrfValidation 공개적으로 프로퍼티

public $enableCsrfValidation

$serializer 공개적으로 프로퍼티

the configuration for creating the serializer that formats the response data.
public $serializer