PHP Class 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.
Mostra file
Open project: yiisoft/yii2
Class Usage Examples
Public Properties
Public Methods
Protected Methods
Method Details
afterAction()
public method
behaviors()
public method
serializeData()
protected method
The default implementation will create a serializer based on the configuration given by [[serializer]].
It then uses the serializer to serialize the given data.
Please refer to [[VerbFilter::actions]] on how to declare the allowed verbs.
Property Details
$enableCsrfValidation public_oe property
public $enableCsrfValidation |
$serializer public_oe property
the configuration for creating the serializer that formats the response data.