original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Inserts an entry into an array given the specified priority number