php - Attach Behavior to all Models -


i'm using yii framework , attach behavior named datetimei18nbehavior models.

i'm doing manually adding following code each model:

public function behaviors() {     return array(         'datetimei18nbehavior' => array('class' => 'ext.datetimei18nbehavior')     ); } 

it's possible that?

just create base model class function, , have other classes extend base model.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -