Commit 4bb2ee95 by Carsten Brandt

updated docs of Event

parent 8d2ce647
...@@ -25,13 +25,15 @@ namespace yii\base; ...@@ -25,13 +25,15 @@ namespace yii\base;
class Event extends Object 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. * Event handlers may use this property to check what event it is handling.
*/ */
public $name; public $name;
/** /**
* @var object the sender of this event. If not set, this property will be * @var object the sender of this event. If not set, this property will be
* set as the object whose "trigger()" method is called. * 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; public $sender;
/** /**
...@@ -88,7 +90,7 @@ class Event extends Object ...@@ -88,7 +90,7 @@ class Event extends Object
* @param string $name the event name. * @param string $name the event name.
* @param callback $handler the event handler to be removed. * @param callback $handler the event handler to be removed.
* If it is null, all handlers attached to the named event will 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() * @see on()
*/ */
public static function off($class, $name, $handler = null) public static function off($class, $name, $handler = null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment