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