行为
2019-08-23 19:09:51 4 举报
AI智能生成
Yii2 行为
作者其他创作
大纲/内容
private $_behaviors
__clone()
$this->_behaviors = null
behaviors()
提供重载
__get($name)
foreach ($this->_behaviors as $behavior)
$behavior->$name
__isset($name)
$behavior->$name !== null
__unset($name)
$behavior->$name = null
foreach ($this->_behaviors as $object)
$behavior->hasMethod($name)
yii\\base\\Component
getBehavior($name)
$this->_behaviors[$name])
getBehaviors()
$this->_behaviors
ensureBehaviors()
foreach ($this->behaviors() as $name => $behavior)
attachBehaviors($behaviors)
foreach ($behaviors as $name => $behavior)
$behavior->$name = $value
$behavior = Yii::createObject($behavior)
is_int($name)
$behavior->attach($this)
$this->_behaviors[] = $behavior
if (isset($this->_behaviors[$name]))
$this->_behaviors[$name]->detach()
$this->_behaviors[$name] = $behavior
detachBehaviors()
foreach ($this->_behaviors as $name => $behavior)
detachBehavior($name)
$behavior = $this->_behaviors[$name]
unset($this->_behaviors[$name])
$behavior->detach()
0 条评论
下一页