src/DcGeneral/Events/BaseSubscriber.php
public function addListener($eventName, $listener, $priority = 200)
    {
        $dispatcher = $this->getServiceContainer()->getEventDispatcher();
        $dispatcher->addListener($eventName, $listener, $priority);

        return $this;
    }
public function addListener($eventName, $listener, $priority = 200)
    {
        $dispatcher = $this->getServiceContainer()->getEventDispatcher();
        $dispatcher->addListener($eventName, $listener, $priority);

        return $this;
    }
Register multiple event listeners.

@param string   $eventName The event name to register.

@param callable $listener  The listener to register.

@param int      $priority  The priority.

@return BaseSubscriber