system system.base system.caching system.caching.dependencies system.collections system.console system.db system.db.ar system.db.schema system.db.schema.cubrid system.db.schema.mssql system.db.schema.mysql system.db.schema.oci system.db.schema.pgsql system.db.schema.sqlite system.gii system.i18n system.i18n.gettext system.logging system.test system.utils system.validators system.web system.web.actions system.web.auth system.web.filters system.web.form system.web.helpers system.web.renderers system.web.services system.web.widgets system.web.widgets.captcha system.web.widgets.pagers zii.behaviors zii.widgets zii.widgets.grid zii.widgets.jui

IBehavior

system.base
继承 interface IBehavior
子类 CActiveRecordBehavior, CBehavior, CConsoleCommandBehavior, CModelBehavior, CTimestampBehavior
源码 framework/base/interfaces.php
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.

公共方法

隐藏继承的方法

方法描述被定义在
attach() Attaches the behavior object to the component. IBehavior
detach() Detaches the behavior object from the component. IBehavior
getEnabled() Returns whether this behavior is enabled IBehavior
setEnabled() Sets whether this behavior is enabled IBehavior

方法详情

attach() 方法
abstract public void attach(CComponent $component)
$component CComponent the component that this behavior is to be attached to.
源码: framework/base/interfaces.php#513 (显示)
public function attach($component);

Attaches the behavior object to the component.

detach() 方法
abstract public void detach(CComponent $component)
$component CComponent the component that this behavior is to be detached from.
源码: framework/base/interfaces.php#518 (显示)
public function detach($component);

Detaches the behavior object from the component.

getEnabled() 方法
abstract public boolean getEnabled()
{return} boolean whether this behavior is enabled
源码: framework/base/interfaces.php#522 (显示)
public function getEnabled();

setEnabled() 方法
abstract public void setEnabled(boolean $value)
$value boolean whether this behavior is enabled
源码: framework/base/interfaces.php#526 (显示)
public function setEnabled($value);