private function sortMaps()
    {
        uasort($this->activeMaps, function(PrioritizedMap $m1, PrioritizedMap $m2) {
            if ($p = $m2->priority - $m1->priority)
                return $p;
            return $m1->priority2 - $m2->priority2;
        });
    }
private function sortMaps()
    {
        uasort($this->activeMaps, function(PrioritizedMap $m1, PrioritizedMap $m2) {
            if ($p = $m2->priority - $m1->priority)
                return $p;
            return $m1->priority2 - $m2->priority2;
        });
    }
private function sortMaps ( ) { uasort ( $ this -> activeMaps , function ( PrioritizedMap $ m1 , PrioritizedMap $ m2 ) { if ( $ p = $ m2 -> priority - $ m1 -> priority ) return $ p ; return $ m1 -> priority2 - $ m2 -> priority2 ; } ) ; }
Sort maps by priority. On equal prioriy, first inserted wins
Sort maps by priority . On equal prioriy first inserted wins