original_string: public function usePlugin($plugin_name, $config = array())
      {
          if (!isset($this->plugins[$plugin_name])) {
              $plugin_name = str_replace(".", "\\", $plugin_name);
              //allow plugin name to use . sign
              $plugin_class_name = $plugin_name."\Main";
              $this->plugins[$plugin_name] = new $plugin_class_name();
              $this->plugins[$plugin_name]->setAppInstance($this);
              $this->plugins[$plugin_name]->load($config);
          }
          return $this->plugins[$plugin_name];
      }
code: public function usePlugin($plugin_name, $config = array())
      {
          if (!isset($this->plugins[$plugin_name])) {
              $plugin_name = str_replace(".", "\\", $plugin_name);
              //allow plugin name to use . sign
              $plugin_class_name = $plugin_name."\Main";
              $this->plugins[$plugin_name] = new $plugin_class_name();
              $this->plugins[$plugin_name]->setAppInstance($this);
              $this->plugins[$plugin_name]->load($config);
          }
          return $this->plugins[$plugin_name];
      }
code_tokens: public function usePlugin ( $ plugin_name , $ config = array ( ) ) { if ( ! isset ( $ this -> plugins [ $ plugin_name ] ) ) { $ plugin_name = str_replace ( "." , "\\" , $ plugin_name ) ; //allow plugin name to use . sign $ plugin_class_name = $ plugin_name . "\Main" ; $ this -> plugins [ $ plugin_name ] = new $ plugin_class_name ( ) ; $ this -> plugins [ $ plugin_name ] -> setAppInstance ( $ this ) ; $ this -> plugins [ $ plugin_name ] -> load ( $ config ) ; } return $ this -> plugins [ $ plugin_name ] ; }
docstring: tell the sytem to use a plugin
docstring_tokens: tell the sytem to use a plugin