mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-21 00:54:53 +08:00
@@ -3,7 +3,7 @@ Behaviors
|
||||
|
||||
A behavior (also knows as *mixin*) can be used to enhance the functionality of an existing component without modifying the component's
|
||||
code. In particular, a behavior can "inject" its own methods and properties into the component, making them directly accessible
|
||||
via the component itslef. A behavior can also respond to events triggered in the component, thus intercepting the normal
|
||||
via the component itself. A behavior can also respond to events triggered in the component, thus intercepting the normal
|
||||
code execution. Unlike [PHP's traits](http://www.php.net/traits), behaviors can be attached to classes at runtime.
|
||||
|
||||
Using behaviors
|
||||
|
||||
Reference in New Issue
Block a user