src/Event/Manager.php
protected function sortEvents($name)
    {
        $priorities = [];
        foreach ($this->orderedHandlers[$name] as $key => $row) {
            if (is_array($row)) {
                $priorities[$key] = $row[0];
            }
        }

        Arrays::adaptOrderCol($priorities);

        foreach ($priorities as $key => $priority) {
            $this->orderedHandlers[$name][$key][0] = $priority;
        }

        Arrays::sortByCol(
            $this->orderedHandlers[$name],
            0,
            SORT_NUMERIC,
            SORT_ASC
        );
    }
protected function sortEvents($name)
    {
        $priorities = [];
        foreach ($this->orderedHandlers[$name] as $key => $row) {
            if (is_array($row)) {
                $priorities[$key] = $row[0];
            }
        }

        Arrays::adaptOrderCol($priorities);

        foreach ($priorities as $key => $priority) {
            $this->orderedHandlers[$name][$key][0] = $priority;
        }

        Arrays::sortByCol(
            $this->orderedHandlers[$name],
            0,
            SORT_NUMERIC,
            SORT_ASC
        );
    }
protected function sortEvents ( $ name ) { $ priorities = [ ] ; foreach ( $ this -> orderedHandlers [ $ name ] as $ key => $ row ) { if ( is_array ( $ row ) ) { $ priorities [ $ key ] = $ row [ 0 ] ; } } Arrays :: adaptOrderCol ( $ priorities ) ; foreach ( $ priorities as $ key => $ priority ) { $ this -> orderedHandlers [ $ name ] [ $ key ] [ 0 ] = $ priority ; } Arrays :: sortByCol ( $ this -> orderedHandlers [ $ name ] , 0 , SORT_NUMERIC , SORT_ASC ) ; }
Modifies priorities and sorts events.

@param    string $name  Event name
@return   void
@see      self::fire()
@internal
Modifies priorities and sorts events .