Public Member Functions | |
__construct (array $data=array()) | |
getObservers () | |
addObserver (Varien_Event_Observer $observer) | |
removeObserverByName ($observerName) | |
dispatch () | |
getName () | |
setName ($data) | |
getBlock () | |
Protected Attributes | |
$_observers |
Definition at line 35 of file Event.php.
Constructor
Initializes observers collection
array | $data |
Definition at line 51 of file Event.php.
00052 { 00053 $this->_observers = new Varien_Event_Observer_Collection(); 00054 parent::__construct($data); 00055 }
addObserver | ( | Varien_Event_Observer $ | observer | ) |
Register an observer for the event
Varien_Event_Observer | $observer |
Definition at line 73 of file Event.php.
00074 { 00075 $this->getObservers()->addObserver($observer); 00076 return $this; 00077 }
dispatch | ( | ) |
Dispatches the event to registered observers
Definition at line 96 of file Event.php.
00097 { 00098 $this->getObservers()->dispatch($this); 00099 return $this; 00100 }
getBlock | ( | ) |
getName | ( | ) |
getObservers | ( | ) |
Returns all the registered observers for the event
Definition at line 62 of file Event.php.
removeObserverByName | ( | $ | observerName | ) |
Removes an observer by its name
string | $observerName |
Definition at line 85 of file Event.php.
00086 { 00087 $this->getObservers()->removeObserverByName($observerName); 00088 return $this; 00089 }
setName | ( | $ | data | ) |