original_string: final public static function registerPlugin($type, $className, $includeFile = null)
      {
          $type = strtolower($type);
          // We don't check self::$_types, since a plugin may be registered
          // before renderer itself if it goes with some custom element
          if (empty(self::$_pluginClasses[$type])) {
              self::$_pluginClasses[$type] = array(array($className, $includeFile));
          } else {
              foreach (self::$_pluginClasses[$type] as $plugin) {
                  if (0 == strcasecmp($plugin[0], $className)) {
                      throw new HTML_QuickForm2_InvalidArgumentException(
                          "Plugin '$className' for renderer type '$type' is already registered"
                      );
                  }
              }
              self::$_pluginClasses[$type][] = array($className, $includeFile);
          }
      }
code: final public static function registerPlugin($type, $className, $includeFile = null)
      {
          $type = strtolower($type);
          // We don't check self::$_types, since a plugin may be registered
          // before renderer itself if it goes with some custom element
          if (empty(self::$_pluginClasses[$type])) {
              self::$_pluginClasses[$type] = array(array($className, $includeFile));
          } else {
              foreach (self::$_pluginClasses[$type] as $plugin) {
                  if (0 == strcasecmp($plugin[0], $className)) {
                      throw new HTML_QuickForm2_InvalidArgumentException(
                          "Plugin '$className' for renderer type '$type' is already registered"
                      );
                  }
              }
              self::$_pluginClasses[$type][] = array($className, $includeFile);
          }
      }
code_tokens: final public static function registerPlugin ( $ type , $ className , $ includeFile = null ) { $ type = strtolower ( $ type ) ; // We don't check self::$_types, since a plugin may be registered // before renderer itself if it goes with some custom element if ( empty ( self :: $ _pluginClasses [ $ type ] ) ) { self :: $ _pluginClasses [ $ type ] = array ( array ( $ className , $ includeFile ) ) ; } else { foreach ( self :: $ _pluginClasses [ $ type ] as $ plugin ) { if ( 0 == strcasecmp ( $ plugin [ 0 ] , $ className ) ) { throw new HTML_QuickForm2_InvalidArgumentException ( "Plugin '$className' for renderer type '$type' is already registered" ) ; } } self :: $ _pluginClasses [ $ type ] [ ] = array ( $ className , $ includeFile ) ; } }
docstring: Registers a plugin for a renderer type
  
  @param    string  Renderer type name (treated case-insensitively)
  @param    string  Plugin class name
  @param    string  File containing the plugin class, leave empty if class already loaded
  @throws   HTML_QuickForm2_InvalidArgumentException if plugin is already registered
docstring_tokens: Registers a plugin for a renderer type