行为
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)
foreach ($this->_behaviors as $behavior)
$behavior->$name !== null
__unset($name)
foreach ($this->_behaviors as $behavior)
$behavior->$name = null
__call($name, $params)
foreach ($this->_behaviors as $object)
call_user_func_array([$object, $name], $params)
hasProperty($name, $checkVars = true, $checkBehaviors = true)
canGetProperty($name, $checkVars = true, $checkBehaviors = true)
foreach ($this->_behaviors as $behavior)
$behavior->canGetProperty($name, $checkVars)
canSetProperty($name, $checkVars = true, $checkBehaviors = true)
foreach ($this->_behaviors as $behavior)
$behavior->canSetProperty($name, $checkVars)
hasMethod($name, $checkBehaviors = true)
foreach ($this->_behaviors as $behavior)
$behavior->hasMethod($name)
getBehavior($name)
$this->_behaviors[$name])
getBehaviors()
$this->_behaviors
ensureBehaviors()
foreach ($this->behaviors() as $name => $behavior)
attachBehaviors($behaviors)
foreach ($behaviors as $name => $behavior)
__set($name, $value)
foreach ($this->_behaviors as $behavior)
$behavior->$name = $value
attachBehavior($name, $behavior)
attachBehaviorInternal($name, $behavior)
$behavior = Yii::createObject($behavior)
is_int($name)
$behavior->attach($this)
$this->_behaviors[] = $behavior
if (isset($this->_behaviors[$name]))
$this->_behaviors[$name]->detach()
$behavior->attach($this)
$this->_behaviors[$name] = $behavior
detachBehaviors()
foreach ($this->_behaviors as $name => $behavior)
detachBehavior($name)
$behavior = $this->_behaviors[$name]
unset($this->_behaviors[$name])
$behavior->detach()
0 条评论
下一页