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.
Afficher le fichier
Open project: yiisoft/yii2
Class Usage Examples
Méthodes publiques
Méthodes publiques
Méthodes protégées
Method Details
afterAction()
public méthode
behaviors()
public méthode
serializeData()
protected méthode
The default implementation will create a serializer based on the configuration given by [[serializer]].
It then uses the serializer to serialize the given data.
verbs()
protected méthode
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.