Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Public Member Functions | |
addModule ($module) | |
Adds a module to the current doctype by first registering it, and then tacking it on to the active doctype. | |
addPrefix ($prefix) | |
Adds a class prefix that registerModule() will use to resolve a string name to a concrete class. | |
getElement ($name, $trusted=null) | |
Retrieves a single merged element definition. | |
getElements () | |
Retrieves merged element definitions. | |
processModule ($module) | |
Takes a module and adds it to the active module collection, registering it if necessary. | |
registerModule ($module, $overload=false) | |
Registers a module to the recognized module list, useful for overloading pre-existing modules. | |
setup ($config) | |
Performs processing on modules, after being called you may use getElement() and getElements() | |
Public Attributes | |
$attrCollections | |
@type HTMLPurifier_AttrCollections | |
$attrTypes | |
@type HTMLPurifier_AttrTypes | |
$contentSets | |
@type HTMLPurifier_ContentSets | |
$doctype | |
Instance of current doctype. | |
$doctypes | |
$elementLookup = array() | |
Associative array of element name to list of modules that have definitions for the element; this array is dynamically filled. | |
$modules = array() | |
Active instances of modules for the specified doctype are indexed, by name, in this array. | |
$prefixes = array('HTMLPurifier_HTMLModule_') | |
List of prefixes we should use for registering small names. | |
$registeredModules = array() | |
Array of recognized HTMLPurifier_HTMLModule instances, indexed by module's class name. | |
$trusted = false | |
If set to true, unsafe elements and attributes will be allowed. | |
$userModules = array() | |
List of extra modules that were added by the user using addModule(). | |
HTMLPurifier_HTMLModuleManager::getElement | ( | $name, | |
$trusted = null ) |
Retrieves a single merged element definition.
string | $name | Name of element |
bool | $trusted | Boolean trusted overriding parameter: set to true if you want the full version of an element |
HTMLPurifier_ElementDef | Merged HTMLPurifier_ElementDef |
HTMLPurifier_HTMLModuleManager::getElements | ( | ) |
Retrieves merged element definitions.
Array | of HTMLPurifier_ElementDef |
HTMLPurifier_HTMLModuleManager::registerModule | ( | $module, | |
$overload = false ) |
Registers a module to the recognized module list, useful for overloading pre-existing modules.
$module | Mixed: string module name, with or without HTMLPurifier_HTMLModule prefix, or instance of subclass of HTMLPurifier_HTMLModule. |
$overload | Boolean whether or not to overload previous modules. If this is not set, and you do overload a module, HTML Purifier will complain with a warning. |
HTMLPurifier_HTMLModuleManager::setup | ( | $config | ) |
Performs processing on modules, after being called you may use getElement() and getElements()
HTMLPurifier_Config | $config |
HTMLPurifier_HTMLModuleManager::$doctype |
Instance of current doctype.
@type string
HTMLPurifier_HTMLModuleManager::$elementLookup = array() |
Associative array of element name to list of modules that have definitions for the element; this array is dynamically filled.
@type array
HTMLPurifier_HTMLModuleManager::$modules = array() |
Active instances of modules for the specified doctype are indexed, by name, in this array.
@type HTMLPurifier_HTMLModule[]
HTMLPurifier_HTMLModuleManager::$prefixes = array('HTMLPurifier_HTMLModule_') |
List of prefixes we should use for registering small names.
@type array
HTMLPurifier_HTMLModuleManager::$registeredModules = array() |
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. @type HTMLPurifier_HTMLModule[]
HTMLPurifier_HTMLModuleManager::$trusted = false |
If set to true, unsafe elements and attributes will be allowed.
@type bool
HTMLPurifier_HTMLModuleManager::$userModules = array() |
List of extra modules that were added by the user using addModule().
These get unconditionally merged into the current doctype, whatever it may be. @type HTMLPurifier_HTMLModule[]