diff --git a/framework/yii/base/Event.php b/framework/yii/base/Event.php index 99f8492..4ba8c7d 100644 --- a/framework/yii/base/Event.php +++ b/framework/yii/base/Event.php @@ -25,13 +25,15 @@ namespace yii\base; class Event extends Object { /** - * @var string the event name. This property is set by [[Component::trigger()]]. + * @var string the event name. This property is set by [[Component::trigger()]] and [[trigger()]]. * Event handlers may use this property to check what event it is handling. */ public $name; /** * @var object the sender of this event. If not set, this property will be * set as the object whose "trigger()" method is called. + * This property may also be a `null` when this event is a + * class-level event which is triggered in a static context. */ public $sender; /** @@ -88,7 +90,7 @@ class Event extends Object * @param string $name the event name. * @param callback $handler the event handler to be removed. * If it is null, all handlers attached to the named event will be removed. - * @return boolean if a handler is found and detached. + * @return boolean whether a handler is found and detached. * @see on() */ public static function off($class, $name, $handler = null)