final public static function factory($type)
    {
        $type = strtolower($type);
        if (!isset(self::$_types[$type])) {
            throw new HTML_QuickForm2_InvalidArgumentException(
                "Renderer type '$type' is not known"
            );
        }

        list ($className, $includeFile) = self::$_types[$type];
        if (!class_exists($className)) {
            HTML_QuickForm2_Loader::loadClass($className, $includeFile);
        }
        if (!class_exists('HTML_QuickForm2_Renderer_Proxy')) {
            HTML_QuickForm2_Loader::loadClass('HTML_QuickForm2_Renderer_Proxy');
        }
        return new HTML_QuickForm2_Renderer_Proxy(new $className, self::$_pluginClasses[$type]);
    }
final public static function factory($type)
    {
        $type = strtolower($type);
        if (!isset(self::$_types[$type])) {
            throw new HTML_QuickForm2_InvalidArgumentException(
                "Renderer type '$type' is not known"
            );
        }

        list ($className, $includeFile) = self::$_types[$type];
        if (!class_exists($className)) {
            HTML_QuickForm2_Loader::loadClass($className, $includeFile);
        }
        if (!class_exists('HTML_QuickForm2_Renderer_Proxy')) {
            HTML_QuickForm2_Loader::loadClass('HTML_QuickForm2_Renderer_Proxy');
        }
        return new HTML_QuickForm2_Renderer_Proxy(new $className, self::$_pluginClasses[$type]);
    }
final public static function factory ( $ type ) { $ type = strtolower ( $ type ) ; if ( ! isset ( self :: $ _types [ $ type ] ) ) { throw new HTML_QuickForm2_InvalidArgumentException ( "Renderer type '$type' is not known" ) ; } list ( $ className , $ includeFile ) = self :: $ _types [ $ type ] ; if ( ! class_exists ( $ className ) ) { HTML_QuickForm2_Loader :: loadClass ( $ className , $ includeFile ) ; } if ( ! class_exists ( 'HTML_QuickForm2_Renderer_Proxy' ) ) { HTML_QuickForm2_Loader :: loadClass ( 'HTML_QuickForm2_Renderer_Proxy' ) ; } return new HTML_QuickForm2_Renderer_Proxy ( new $ className , self :: $ _pluginClasses [ $ type ] ) ; }
Creates a new renderer instance of the given type

A renderer is always wrapped by a Proxy, which handles calling its
"published" methods and methods of its plugins. Registered plugins are
added automagically to the existing renderer instances so that
<code>
$foo = HTML_QuickForm2_Renderer::factory('foo');
// Plugin implementing bar() method
HTML_QuickForm2_Renderer::registerPlugin('foo', 'Plugin_Foo_Bar');
$foo->bar();
</code>
will work.

@param    string  Type name (treated case-insensitively)
@return   HTML_QuickForm2_Renderer_Proxy  A renderer instance of the given
type wrapped by a Proxy
@throws   HTML_QuickForm2_InvalidArgumentException If type name is unknown
@throws   HTML_QuickForm2_NotFoundException If class for the renderer can
not be found and/or loaded from file
Creates a new renderer instance of the given type