IBehavior
| Package | system.base |
|---|---|
| Inheritance | interface IBehavior |
| Subclasses | CActiveRecordBehavior, CBehavior, CModelBehavior, CTimestampBehavior |
| Since | 1.0.2 |
| Version | $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $ |
IBehavior interfaces is implemented by all behavior classes.
A behavior is a way to enhance a component with additional methods that are defined in the behavior class and not available in the component class.
A behavior is a way to enhance a component with additional methods that are defined in the behavior class and not available in the component class.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| attach() | Attaches the behavior object to the component. | IBehavior |
| detach() | Detaches the behavior object from the component. | IBehavior |
| getEnabled() | IBehavior | |
| setEnabled() | IBehavior |
Method Details
attach()
method
|
abstract public void attach(CComponent $component)
| ||
| $component | CComponent | the component that this behavior is to be attached to. |
Attaches the behavior object to the component.
detach()
method
|
abstract public void detach(CComponent $component)
| ||
| $component | CComponent | the component that this behavior is to be detached from. |
Detaches the behavior object from the component.
getEnabled()
method
|
abstract public boolean getEnabled()
| ||
| {return} | boolean | whether this behavior is enabled |
setEnabled()
method
|
abstract public void setEnabled(boolean $value)
| ||
| $value | boolean | whether this behavior is enabled |