src/Event/src/EventDispatcher.php
protected function sortEventListeners(string $eventName): array
    {
        $listeners = $this->listeners[$eventName];
        $normalised = [];

        ksort($listeners);

        foreach ($listeners as $priorityListeners) {
            foreach ($priorityListeners as $listener) {
                $normalised[] = $listener;
            }
        }

        return $normalised;
    }
protected function sortEventListeners(string $eventName): array
    {
        $listeners = $this->listeners[$eventName];
        $normalised = [];

        ksort($listeners);

        foreach ($listeners as $priorityListeners) {
            foreach ($priorityListeners as $listener) {
                $normalised[] = $listener;
            }
        }

        return $normalised;
    }
protected function sortEventListeners ( string $ eventName ) : array { $ listeners = $ this -> listeners [ $ eventName ] ; $ normalised = [ ] ; ksort ( $ listeners ) ; foreach ( $ listeners as $ priorityListeners ) { foreach ( $ priorityListeners as $ listener ) { $ normalised [ ] = $ listener ; } } return $ normalised ; }
Merges all event listeners for particular event.

@param  string $eventName
@return array
Merges all event listeners for particular event .