public function EventManager::removeEventListener in Plug 7
Removes an event listener from the specified events.
Parameters
string|array $events:
object $listener:
Return value
void
1 call to EventManager::removeEventListener()
- EventManager::removeEventSubscriber in lib/
doctrine/ common/ lib/ Doctrine/ Common/ EventManager.php - Removes an EventSubscriber. The subscriber is asked for all the events it is interested in and removed as a listener for these events.
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ EventManager.php, line 116
Class
- EventManager
- The EventManager is the central point of Doctrine's event listener system. Listeners are registered on the manager and events are dispatched through the manager.
Namespace
Doctrine\CommonCode
public function removeEventListener($events, $listener) {
// Picks the hash code related to that listener
$hash = spl_object_hash($listener);
foreach ((array) $events as $event) {
// Check if actually have this listener associated
if (isset($this->_listeners[$event][$hash])) {
unset($this->_listeners[$event][$hash]);
}
}
}