17    public static function instance($prototype = 
null)
 
   19        static $instance = 
null;
 
   20        if ($prototype !== 
null) {
 
   21            $instance = $prototype;
 
   22        } elseif ($instance === 
null || $prototype == 
true) {
 
   48        $allowed_schemes = 
$config->get(
'URI.AllowedSchemes');
 
   49        if (!
$config->get(
'URI.OverrideAllowedSchemes') &&
 
   50            !isset($allowed_schemes[$scheme])
 
   55        if (isset($this->schemes[$scheme])) {
 
   56            return $this->schemes[$scheme];
 
   58        if (!isset($allowed_schemes[$scheme])) {
 
   62        $class = 
'HTMLPurifier_URIScheme_' . $scheme;
 
   63        if (!class_exists($class)) {
 
   66        $this->schemes[$scheme] = 
new $class();
 
   67        return $this->schemes[$scheme];
 
   75    public function register($scheme, $scheme_obj)
 
   77        $this->schemes[$scheme] = $scheme_obj;
 
An exception for terminatinating execution or to throw for unit testing.
static createDefault()
Convenience constructor that creates a default configuration object.
Registry for retrieving specific URI scheme validator objects.
$schemes
Cache of retrieved schemes.
static instance($prototype=null)
Retrieve sole instance of the registry.
getScheme($scheme, $config, $context)
Retrieves a scheme validator object.