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

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -