事件 yii\base\Event
2019-08-23 18:03:39 4 举报
AI智能生成
Yii2 事件
作者其他创作
大纲/内容
yii\\base\\Event
public $name
public $sender
public $handled = false
public $data
private static $_events = []
unset(self::$_events[$name][$class])
foreach (self::$_events[$name][$class] as $i => $event)
unset(self::$_events[$name][$class][$i])
self::$_events[$name][$class] = array_values(self::$_events[$name][$class])
static::offAll()
self::$_events = []
foreach ($classes as $class)
!empty(self::$_events[$name][$class])
$event = new static
$event->handled = false
$event->name = $name
$event->sender = $class
foreach (self::$_events[$name][$class] as $handler)
$event->data = $handler[1]
0 条评论
下一页