44 $this->_eventMap = array(
45 'Swift_Events_CommandEvent' =>
'Swift_Events_CommandListener',
46 'Swift_Events_ResponseEvent' =>
'Swift_Events_ResponseListener',
47 'Swift_Events_SendEvent' =>
'Swift_Events_SendListener',
48 'Swift_Events_TransportChangeEvent' =>
'Swift_Events_TransportChangeListener',
49 'Swift_Events_TransportExceptionEvent' =>
'Swift_Events_TransportExceptionListener'
75 $command, $successCodes = array())
125 foreach ($this->_listeners as $l)
128 if ($l === $listener)
133 $this->_listeners[] = $listener;
153 $this->_bubbleQueue = array();
154 $evtClass = get_class($evt);
155 foreach ($this->_listeners as $listener)
157 if (array_key_exists($evtClass, $this->_eventMap)
158 && ($listener instanceof $this->_eventMap[$evtClass]))
160 $this->_bubbleQueue[] = $listener;
168 if (!$evt->
bubbleCancelled() && $listener = array_shift($this->_bubbleQueue))
170 $listener->$target($evt);