rest\IndexAction run()

run() public method public yii\data\ActiveDataProvider run ( )

rest\IndexAction prepareDataProvider()

prepareDataProvider() protected method Prepares the data provider that should return the requested collection of the models. protected yii\data\ActiveDataProvider prepareDataProvider ( )

rest\DeleteAction run()

run() public method Deletes a model. public void run ( $id )$id mixed Id of the model to be deleted. throws yii\web\ServerErrorHttpException on failure.

rest\IndexAction $prepareDataProvider

$prepareDataProvider public property A PHP callable that will be called to prepare a data provider that should return a collection of the models. If not set, prepareDataProvider() will be used instead. The signature of the callable should be: function ($action) { // $action is the action object currently running } The callable should return an instance of yii\data\ActiveDataProvider. public callable $prepareDataProvider = null

rest\CreateAction run()

run() public method Creates a new model. public yii\db\ActiveRecordInterface run ( )return yii\db\ActiveRecordInterface The model newly created throws yii\web\ServerErrorHttpException if there is any error when creating the model

rest\CreateAction $viewAction

$viewAction public property The name of the view action. This property is need to create the URL when the model is successfully created. public string $viewAction = 'view'

rest\CreateAction $scenario

$scenario public property The scenario to be assigned to the new model before it is validated and saved. public string $scenario = \yii\base\Model::SCENARIO_DEFAULT

rest\Controller verbs()

verbs() protected method Declares the allowed HTTP verbs. Please refer to yii\filters\VerbFilter::$actions on how to declare the allowed verbs. protected array verbs ( )return array The allowed HTTP verbs.

rest\Controller behaviors()

behaviors() public method Returns a list of behaviors that this component should behave as. Child classes may override this method to specify the behaviors they want to behave as. The return value of this method should be an array of behavior objects or configurations indexed by behavior names. A behavior configuration can be either a string specifying the behavior class or an array of the following structure: 'behaviorName' => [ 'class' => 'BehaviorClass', 'property1' => '

rest\Controller serializeData()

serializeData() protected method Serializes the specified data. 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 mixed serializeData ( $data )$data mixed The data to be serialized return mixed The serialized data.