class SomeModel extends CActiveRecord { public function behaviors() { return array( 'timestamp' => array( 'class' => 'zii.behaviors.CTimestampBehavior', 'createAttribute' => 'created_at', 'updateAttribute' => 'updated_at', ), ); } }
class SomeModel extends CActiveRecord { public function behaviors() { return array( 'sluggable' => array( 'class' => 'ext.behaviors.ESluggableBehavior', 'slugAttribute' => 'slug', 'attribute' => 'title', ), ); } }The package library for these behaviors is the Yii framework and its extensions.