Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
HTMLPurifier_DoctypeRegistry Class Reference

Public Member Functions

 get ($doctype)
 Retrieves reference to a doctype of a certain name.
 
 getDoctypeFromConfig ($config)
 Retrieves the doctype from the configuration object.
 
 make ($config)
 Creates a doctype based on a configuration object, will perform initialization on the doctype.
 
 register ( $doctype, $xml=true, $modules=array(), $tidy_modules=array(), $aliases=array(), $dtd_public=null, $dtd_system=null)
 Registers a doctype to the registry.
 

Protected Attributes

 $aliases
 Lookup table of aliases to real doctype names.
 
 $doctypes
 

Member Function Documentation

◆ get()

HTMLPurifier_DoctypeRegistry::get ( $doctype)

Retrieves reference to a doctype of a certain name.

Note
This function resolves aliases
When possible, use the more fully-featured make()
Parameters
string$doctypeName of doctype
Return values
HTMLPurifier_DoctypeEditable doctype object

◆ getDoctypeFromConfig()

HTMLPurifier_DoctypeRegistry::getDoctypeFromConfig ( $config)

Retrieves the doctype from the configuration object.

Parameters
HTMLPurifier_Config$config
Return values
string

◆ make()

HTMLPurifier_DoctypeRegistry::make ( $config)

Creates a doctype based on a configuration object, will perform initialization on the doctype.

Note
Use this function to get a copy of doctype that config can hold on to (this is necessary in order to tell Generator whether or not the current document is XML based or not).
Parameters
HTMLPurifier_Config$config
Return values
HTMLPurifier_Doctype

◆ register()

HTMLPurifier_DoctypeRegistry::register ( $doctype,
$xml = true,
$modules = array(),
$tidy_modules = array(),
$aliases = array(),
$dtd_public = null,
$dtd_system = null )

Registers a doctype to the registry.

Note
Accepts a fully-formed doctype object, or the parameters for constructing a doctype object
Parameters
string$doctypeName of doctype or literal doctype object
bool$xml
array$modulesModules doctype will load
array$tidy_modulesModules doctype will load for certain modes
array$aliasesAlias names for doctype
string$dtd_public
string$dtd_system
Return values
HTMLPurifier_DoctypeEditable registered doctype

Member Data Documentation

◆ $aliases

HTMLPurifier_DoctypeRegistry::$aliases
protected

Lookup table of aliases to real doctype names.

@type array


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