Thanks for the feedback.
I bundled the classes I'm using into an extension that I've posted to Github
This extension differs from the Yii philosophy (expressed by Gii) that controllers should contain the logic used to generate their action parameters. (E.g. using loadModel().) In the extension, the controller delegates the task of generating action parameters to a form class.
The flow is as follows:
- Controller parses raw request data using an adaptor class.
- The adaptor class passes attributes to an action parameters model in a standardized format
- The parameters model validates the request parameters and loads additional dependent parameters, e.g. a model
- The filters validate the parameters model
- The parameters model attributes are bound as action parameters automatically by Yii
A standard RESTController with this extension is just a controller extending from the base class. In many cases you will not have to modify the default actions() or filters() configurations at all.