src/Event/src/EventDispatcher.php
protected function getListeners(string $eventName): array
    {
        if (!isset($this->listeners[$eventName])) {
            return [];
        }

        if (!isset($this->sortedListeners[$eventName])) {
            $this->sortedListeners[$eventName] = $this->sortEventListeners($eventName);
        }

        return $this->sortedListeners[$eventName];
    }
protected function getListeners(string $eventName): array
    {
        if (!isset($this->listeners[$eventName])) {
            return [];
        }

        if (!isset($this->sortedListeners[$eventName])) {
            $this->sortedListeners[$eventName] = $this->sortEventListeners($eventName);
        }

        return $this->sortedListeners[$eventName];
    }
protected function getListeners ( string $ eventName ) : array { if ( ! isset ( $ this -> listeners [ $ eventName ] ) ) { return [ ] ; } if ( ! isset ( $ this -> sortedListeners [ $ eventName ] ) ) { $ this -> sortedListeners [ $ eventName ] = $ this -> sortEventListeners ( $ eventName ) ; } return $ this -> sortedListeners [ $ eventName ] ; }
Returns array of event listeners.

@param  string $eventName
@return array
Returns array of event listeners .