Methods | ||||||
---|---|---|---|---|---|---|
public
|
__construct()
|
# | ||||
public
|
registerModule($module, $overload = false)
Registers a module to the recognized module list, useful for
overloading pre-existing modules.
Registers a module to the recognized module list, useful for overloading pre-existing modules. |
# | ||||
public
|
addModule($module)
Adds a module to the current doctype by first registering it,
and then tacking it on to the active doctype
Adds a module to the current doctype by first registering it, and then tacking it on to the active doctype |
# | ||||
public
|
addPrefix($prefix)
Adds a class prefix that registerModule() will use to resolve a
string name to a concrete class
Adds a class prefix that registerModule() will use to resolve a string name to a concrete class |
# | ||||
public
|
setup(HTMLPurifier_Config $config)
Performs processing on modules, after being called you may
use getElement() and getElements()
Performs processing on modules, after being called you may use getElement() and getElements() |
# | ||||
public
|
processModule($module)
Takes a module and adds it to the active module collection,
registering it if necessary.
Takes a module and adds it to the active module collection, registering it if necessary. |
# | ||||
public
|
getElements(): Array
Retrieves merged element definitions.
Retrieves merged element definitions. Returnsof HTMLPurifier_ElementDef |
# | ||||
public
|
getElement(string $name, bool $trusted = null): HTMLPurifier_ElementDef
Retrieves a single merged element definition
Retrieves a single merged element definition Parameters
ReturnsMerged HTMLPurifier_ElementDef |
# |
Properties | |||
---|---|---|---|
public
|
|
$doctypes
|
# |
public
|
|
$doctype
Instance of current doctype.
Instance of current doctype. |
# |
public
|
|
$attrTypes
|
# |
public
|
|
$modules = []
Active instances of modules for the specified doctype are
indexed, by name, in this array.
Active instances of modules for the specified doctype are indexed, by name, in this array. |
# |
public
|
|
$registeredModules = []
Array of recognized HTMLPurifier_HTMLModule instances,
indexed by module's class name. This array is usually lazy…
Array of recognized HTMLPurifier_HTMLModule instances, indexed by module's class name. This array is usually lazy loaded, but a user can overload a module by pre-emptively registering it. |
# |
public
|
|
$userModules = []
List of extra modules that were added by the user
using addModule(). These get unconditionally merged into the current…
List of extra modules that were added by the user using addModule(). These get unconditionally merged into the current doctype, whatever it may be. |
# |
public
|
|
$elementLookup = []
Associative array of element name to list of modules that have
definitions for the element; this array is dynamically…
Associative array of element name to list of modules that have definitions for the element; this array is dynamically filled. |
# |
public
|
|
$prefixes = ['HTMLPurifier_HTMLModule_']
List of prefixes we should use for registering small names.
List of prefixes we should use for registering small names. |
# |
public
|
|
$contentSets
|
# |
public
|
|
$attrCollections
|
# |
public
|
|
$trusted = false
If set to true, unsafe elements and attributes will be allowed.
If set to true, unsafe elements and attributes will be allowed. |
# |