Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
HTMLPurifier_ContentSets Class Reference

Public Member Functions

 __construct ($modules)
 Merges in module's content sets, expands identifiers in the content sets and populates the keys, values and lookup member variables.
 
 generateChildDef (&$def, $module)
 Accepts a definition; generates and assigns a ChildDef for it.
 
 generateChildDefCallback ($matches)
 
 getChildDef ($def, $module)
 Instantiates a ChildDef based on content_model and content_model_type member variables in HTMLPurifier_ElementDef.
 

Public Attributes

 $info = array()
 List of content set strings (pipe separators) indexed by name.
 
 $lookup = array()
 List of content set lookups (element => true) indexed by name.
 

Protected Member Functions

 convertToLookup ($string)
 Converts a string list of elements separated by pipes into a lookup array.
 

Protected Attributes

 $keys = array()
 Synchronized list of defined content sets (keys of info).
 
 $values = array()
 Synchronized list of defined content values (values of info).
 

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_ContentSets::__construct ( $modules)

Merges in module's content sets, expands identifiers in the content sets and populates the keys, values and lookup member variables.

Parameters
HTMLPurifier_HTMLModule[]$modulesList of HTMLPurifier_HTMLModule

Member Function Documentation

◆ convertToLookup()

HTMLPurifier_ContentSets::convertToLookup ( $string)
protected

Converts a string list of elements separated by pipes into a lookup array.

Parameters
string$stringList of elements
Return values
arrayLookup array of elements

◆ generateChildDef()

HTMLPurifier_ContentSets::generateChildDef ( & $def,
$module )

Accepts a definition; generates and assigns a ChildDef for it.

Parameters
HTMLPurifier_ElementDef$defHTMLPurifier_ElementDef reference
HTMLPurifier_HTMLModule$moduleModule that defined the ElementDef

◆ getChildDef()

HTMLPurifier_ContentSets::getChildDef ( $def,
$module )

Instantiates a ChildDef based on content_model and content_model_type member variables in HTMLPurifier_ElementDef.

Note
This will also defer to modules for custom HTMLPurifier_ChildDef subclasses that need content set expansion
Parameters
HTMLPurifier_ElementDef$defHTMLPurifier_ElementDef to have ChildDef extracted
HTMLPurifier_HTMLModule$moduleModule that defined the ElementDef
Return values
HTMLPurifier_ChildDefcorresponding to ElementDef

Member Data Documentation

◆ $info

HTMLPurifier_ContentSets::$info = array()

List of content set strings (pipe separators) indexed by name.

@type array

◆ $keys

HTMLPurifier_ContentSets::$keys = array()
protected

Synchronized list of defined content sets (keys of info).

@type array

◆ $lookup

HTMLPurifier_ContentSets::$lookup = array()

List of content set lookups (element => true) indexed by name.

@type array

Note
This is in HTMLPurifier_HTMLDefinition->info_content_sets

◆ $values

HTMLPurifier_ContentSets::$values = array()
protected

Synchronized list of defined content values (values of info).

@type array


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