Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
HTMLPurifier_URISchemeRegistry Class Reference

Public Member Functions

 getScheme ($scheme, $config, $context)
 Retrieves a scheme validator object.
 
 register ($scheme, $scheme_obj)
 Registers a custom scheme to the cache, bypassing reflection.
 

Static Public Member Functions

static instance ($prototype=null)
 Retrieve sole instance of the registry.
 

Protected Attributes

 $schemes = array()
 Cache of retrieved schemes.
 

Member Function Documentation

◆ getScheme()

HTMLPurifier_URISchemeRegistry::getScheme ( $scheme,
$config,
$context )

Retrieves a scheme validator object.

Parameters
string$schemeString scheme name like http or mailto
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Return values
HTMLPurifier_URIScheme

◆ instance()

static HTMLPurifier_URISchemeRegistry::instance ( $prototype = null)
static

Retrieve sole instance of the registry.

Parameters
HTMLPurifier_URISchemeRegistry$prototypeOptional prototype to overload sole instance with, or bool true to reset to default registry.
Return values
HTMLPurifier_URISchemeRegistry
Note
Pass a registry object $prototype with a compatible interface and the function will copy it and return it all further times.

◆ register()

HTMLPurifier_URISchemeRegistry::register ( $scheme,
$scheme_obj )

Registers a custom scheme to the cache, bypassing reflection.

Parameters
string$schemeScheme name
HTMLPurifier_URIScheme$scheme_obj

Member Data Documentation

◆ $schemes

HTMLPurifier_URISchemeRegistry::$schemes = array()
protected

Cache of retrieved schemes.

@type HTMLPurifier_URIScheme[]


The documentation for this class was generated from the following file: