public static function create($config, $schema = null)
    {
        if ($config instanceof HTMLPurifier_Config) {
            // pass-through
            return $config;
        }
        if (!$schema) {
            $ret = HTMLPurifier_Config::createDefault();
        } else {
            $ret = new HTMLPurifier_Config($schema);
        }
        if (is_string($config)) {
            $ret->loadIni($config);
        } elseif (is_array($config)) $ret->loadArray($config);
        return $ret;
    }
public static function create($config, $schema = null)
    {
        if ($config instanceof HTMLPurifier_Config) {
            // pass-through
            return $config;
        }
        if (!$schema) {
            $ret = HTMLPurifier_Config::createDefault();
        } else {
            $ret = new HTMLPurifier_Config($schema);
        }
        if (is_string($config)) {
            $ret->loadIni($config);
        } elseif (is_array($config)) $ret->loadArray($config);
        return $ret;
    }
public static function create ( $ config , $ schema = null ) { if ( $ config instanceof HTMLPurifier_Config ) { // pass-through return $ config ; } if ( ! $ schema ) { $ ret = HTMLPurifier_Config :: createDefault ( ) ; } else { $ ret = new HTMLPurifier_Config ( $ schema ) ; } if ( is_string ( $ config ) ) { $ ret -> loadIni ( $ config ) ; } elseif ( is_array ( $ config ) ) $ ret -> loadArray ( $ config ) ; return $ ret ; }
Convenience constructor that creates a config object based on a mixed var
@param mixed $config Variable that defines the state of the config
object. Can be: a HTMLPurifier_Config() object,
an array of directives based on loadArray(),
or a string filename of an ini file.
@param HTMLPurifier_ConfigSchema $schema Schema object
@return HTMLPurifier_Config Configured object
Convenience constructor that creates a config object based on a mixed var