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