Class HTMLPurifier_HTMLModuleManager

InheritanceHTMLPurifier_HTMLModuleManager

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$attrCollections HTMLPurifier_HTMLModuleManager
$attrTypes HTMLPurifier_HTMLModuleManager
$contentSets HTMLPurifier_HTMLModuleManager
$doctype Instance of current doctype. HTMLPurifier_HTMLModuleManager
$doctypes HTMLPurifier_HTMLModuleManager
$elementLookup Associative array of element name to list of modules that have definitions for the element; this array is dynamically filled. HTMLPurifier_HTMLModuleManager
$modules Active instances of modules for the specified doctype are indexed, by name, in this array. HTMLPurifier_HTMLModuleManager
$prefixes List of prefixes we should use for registering small names. HTMLPurifier_HTMLModuleManager
$registeredModules 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. HTMLPurifier_HTMLModuleManager
$trusted If set to true, unsafe elements and attributes will be allowed. HTMLPurifier_HTMLModuleManager
$userModules List of extra modules that were added by the user using addModule(). These get unconditionally merged into the current doctype, whatever it may be. HTMLPurifier_HTMLModuleManager

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() HTMLPurifier_HTMLModuleManager
addModule() Adds a module to the current doctype by first registering it, and then tacking it on to the active doctype HTMLPurifier_HTMLModuleManager
addPrefix() Adds a class prefix that registerModule() will use to resolve a string name to a concrete class HTMLPurifier_HTMLModuleManager
getElement() Retrieves a single merged element definition HTMLPurifier_HTMLModuleManager
getElements() Retrieves merged element definitions. HTMLPurifier_HTMLModuleManager
processModule() Takes a module and adds it to the active module collection, registering it if necessary. HTMLPurifier_HTMLModuleManager
registerModule() Registers a module to the recognized module list, useful for overloading pre-existing modules. HTMLPurifier_HTMLModuleManager
setup() Performs processing on modules, after being called you may use getElement() and getElements() HTMLPurifier_HTMLModuleManager

Property Details

$attrCollections public property
public $attrCollections null
$attrTypes public property
public $attrTypes null
$contentSets public property
public $contentSets null
$doctype public property
public $doctype null
$doctypes public property
public $doctypes null
$elementLookup public property
public $elementLookup = []
$modules public property
public $modules = []
$prefixes public property
public $prefixes = ['HTMLPurifier_HTMLModule_']
$registeredModules public property
public $registeredModules = []
$trusted public property
public $trusted false
$userModules public property
public $userModules = []

Method Details

__construct() public method

public void __construct ( )
addModule() public method

Adds a module to the current doctype by first registering it, and then tacking it on to the active doctype

public void addModule ( $module )
$module
addPrefix() public method

Adds a class prefix that registerModule() will use to resolve a string name to a concrete class

public void addPrefix ( $prefix )
$prefix
getElement() public method

Retrieves a single merged element definition

public HTMLPurifier_ElementDef getElement ( $name, $trusted null )
$name string

Name of element

$trusted bool

Boolean trusted overriding parameter: set to true

            if you want the full version of an element
return HTMLPurifier_ElementDef

Merged HTMLPurifier_ElementDef

getElements() public method

Retrieves merged element definitions.

public Array getElements ( )
return Array

Of HTMLPurifier_ElementDef

processModule() public method

Takes a module and adds it to the active module collection, registering it if necessary.

public void processModule ( $module )
$module
registerModule() public method

Registers a module to the recognized module list, useful for overloading pre-existing modules.

public void registerModule ( $module, $overload false )
$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.
setup() public method

Performs processing on modules, after being called you may use getElement() and getElements()

public void setup ( $config )
$config HTMLPurifier_Config