src/AbstractContainerMediator.php
public function getServiceListeners(string $eventName = ''): array
    {
        $this->sortServiceListeners($eventName);
        if ('' !== $eventName) {
            return \array_key_exists($eventName, $this->serviceListeners) ? $this->serviceListeners[$eventName] : [];
        }
        return $this->serviceListeners;
    }
public function getServiceListeners(string $eventName = ''): array
    {
        $this->sortServiceListeners($eventName);
        if ('' !== $eventName) {
            return \array_key_exists($eventName, $this->serviceListeners) ? $this->serviceListeners[$eventName] : [];
        }
        return $this->serviceListeners;
    }
public function getServiceListeners ( string $ eventName = '' ) : array { $ this -> sortServiceListeners ( $ eventName ) ; if ( '' !== $ eventName ) { return \ array_key_exists ( $ eventName , $ this -> serviceListeners ) ? $ this -> serviceListeners [ $ eventName ] : [ ] ; } return $ this -> serviceListeners ; }
Get a list of service listeners for an event.

Note that if event name is empty all listeners will be returned. Any event subscribers are also included in the
list.

@param string $eventName Name of the event the list of service listeners is needed for.

@return array List of event service listeners or empty array if event is unknown or has no listeners or
subscribers.
@throws \InvalidArgumentException
Get a list of service listeners for an event .