API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_ContentSets Class Reference

Public Member Functions

 __construct ($modules)
 
 generateChildDef (&$def, $module)
 
 generateChildDefCallback ($matches)
 
 getChildDef ($def, $module)
 

Data Fields

 $info = array()
 
 $lookup = array()
 

Protected Member Functions

 convertToLookup ($string)
 

Protected Attributes

 $keys = array()
 
 $values = array()
 

Detailed Description

Todo:
Unit test

Constructor & Destructor Documentation

◆ __construct()

__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
Here is the call graph for this function:

Member Function Documentation

◆ convertToLookup()

convertToLookup (   $string)
protected

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

Parameters
string$stringList of elements
Returns
array Lookup array of elements
Here is the caller graph for this function:

◆ generateChildDef()

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
Here is the call graph for this function:

◆ generateChildDefCallback()

generateChildDefCallback (   $matches)

◆ getChildDef()

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
Returns
HTMLPurifier_ChildDef corresponding to ElementDef
Here is the caller graph for this function:

Field Documentation

◆ $info

$info = array()

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

◆ $keys

$keys = array()
protected

Synchronized list of defined content sets (keys of info). @type array

◆ $lookup

$lookup = array()

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

Note
This is in HTMLPurifier_HTMLDefinition->info_content_sets

◆ $values

$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: