Public Member Functions | |
__construct () | |
getAllObservers () | |
getObserverByName ($observerName) | |
addObserver (Varien_Event_Observer $observer) | |
removeObserverByName ($observerName) | |
dispatch (Varien_Event $event) | |
Protected Attributes | |
$_observers |
Definition at line 35 of file Collection.php.
__construct | ( | ) |
Initializes observers
Definition at line 48 of file Collection.php.
00049 { 00050 $this->_observers = array(); 00051 }
addObserver | ( | Varien_Event_Observer $ | observer | ) |
Adds an observer to the collection
Varien_Event_Observer | $observer |
Definition at line 80 of file Collection.php.
dispatch | ( | Varien_Event $ | event | ) |
Dispatches an event to all observers in the collection
Varien_Event | $event |
Definition at line 104 of file Collection.php.
00105 { 00106 foreach ($this->_observers as $observer) { 00107 $observer->dispatch($event); 00108 } 00109 return $this; 00110 }
getAllObservers | ( | ) |
getObserverByName | ( | $ | observerName | ) |
Returns observer by its name
string | $observerName |
Definition at line 69 of file Collection.php.
removeObserverByName | ( | $ | observerName | ) |
Removes an observer from the collection by its name
string | $observerName |
Definition at line 92 of file Collection.php.
$_observers [protected] |
Definition at line 42 of file Collection.php.