Browse Source

updated docs of Event

tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
4bb2ee95b7
  1. 6
      framework/yii/base/Event.php

6
framework/yii/base/Event.php

@ -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
* @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)

Loading…
Cancel
Save