Create models and cotrollers without using DB

I am just starting out on using yii. All the tutorials I found use Databases for creating models and controllers.

How do I create them without using DB? Suppose I wanted to use a text file that retrieves data(for ex: currently logged in users) using JSON

First thing to do: read more about CFormModel.

Also see the API reference here.

Controllers aren’t db dependent.


Thanks tommy…so should I manually create the controller file and then code it from scratch because I’m not able to create them from localhost/testdrive/index.php?r=gii? Its giving cannot link to database.