To create your own behavior, you must define a class that implements the `IBehavior` interface. This can be accomplished by extending `CBehavior`. More specifically, you can extend `CModelBehavior` or `CActiveRecordBehavior` for behaviors to be used specifically with models or with Active Record models.
To create your own behavior, you must define a class that implements the `IBehavior` interface. This can be accomplished by extending `CBehavior`. More specifically, you can extend `CModelBehavior` or `CActiveRecordBehavior` for behaviors to be used specifically with models or with Active Record models.
```php
```php
classMyBehaviorextendsCActiveRecordBehavior
classMyBehaviorextendsCActiveRecordBehavior
...
@@ -87,4 +87,4 @@ class MyBehavior extends CActiveRecordBehavior
...
@@ -87,4 +87,4 @@ class MyBehavior extends CActiveRecordBehavior