/**
  * Get the name of the method which needs running based upon the listener name
  * @return string
  */
 function getNotifyMethod($listener)
 {
     $map = Swift_Events_ListenerMapper::getMap();
     if (isset($map[$listener])) {
         return $map[$listener];
     } else {
         return false;
     }
 }
Beispiel #2
0
 /**
  * Populate the listeners array with the defined listeners ready for plugins
  */
 protected function initializeEventListenerContainer()
 {
     Swift_ClassLoader::load("Swift_Events_ListenerMapper");
     foreach (Swift_Events_ListenerMapper::getMap() as $interface => $method) {
         if (!isset($this->listeners[$interface])) {
             $this->listeners[$interface] = array();
         }
     }
 }