private function setPluginPriority(Plugin $xPlugin, $nPriority)
    {
        while (isset($this->aPlugins[$nPriority]))
        {
            $nPriority++;
        }
        $this->aPlugins[$nPriority] = $xPlugin;
        // Sort the array by ascending keys
        ksort($this->aPlugins);
    }
private function setPluginPriority(Plugin $xPlugin, $nPriority)
    {
        while (isset($this->aPlugins[$nPriority]))
        {
            $nPriority++;
        }
        $this->aPlugins[$nPriority] = $xPlugin;
        // Sort the array by ascending keys
        ksort($this->aPlugins);
    }
private function setPluginPriority ( Plugin $ xPlugin , $ nPriority ) { while ( isset ( $ this -> aPlugins [ $ nPriority ] ) ) { $ nPriority ++ ; } $ this -> aPlugins [ $ nPriority ] = $ xPlugin ; // Sort the array by ascending keys ksort ( $ this -> aPlugins ) ; }
Inserts an entry into an array given the specified priority number

If a plugin already exists with the given priority, the priority is automatically incremented until a free spot is found.
The plugin is then inserted into the empty spot in the array.

@param Plugin         $xPlugin               An instance of a plugin
@param integer        $nPriority             The desired priority, used to order the plugins

@return void
Inserts an entry into an array given the specified priority number