php - Yii: add prefix/postfix to model class naming -


Is there any way that I can work with Yii models that have a prefix or postfix in their class name ?

For example, I have a table user who matches the model user. Now, I want this model to be a prefix, say, EmulatedUser, is there any way without changing my table name?

The table and the class name are not the same You can override in your model:

  & lt ;? Php class EmulatedUser CActiveRecord {public function tableName () {return 'user'; }}  

Comments