示例#1
0
 public function __construct($eventName, PublisherInterface $publisher)
 {
     // optional event type specific stuff happens here
     parent::__construct($eventName, $publisher);
 }
示例#2
0
 public function listen(Event $event)
 {
     if ($event->getName() === GenericEvent::TRIGGERED) {
         echo sprintf("Listener for '%s' called.", GenericEvent::TRIGGERED);
     }
 }