HTMLPurifier_ContentSets Class Reference

List of all members.

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.
 getChildDef ($def, $module)
 Instantiates a ChildDef based on content_model and content_model_type member variables in HTMLPurifier_ElementDef.
 __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.
 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 seperators) 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.
 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).


Detailed Description

Todo:
Unit test
Todo:
Unit test

Definition at line 6 of file ContentSets.php.


Constructor & Destructor Documentation

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:
$modules List of HTMLPurifier_HTMLModule

Definition at line 34 of file ContentSets.php.

References convertToLookup().

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:
$modules List of HTMLPurifier_HTMLModule

Definition at line 1968 of file HTMLPurifier.standalone.php.

References convertToLookup().


Member Function Documentation

HTMLPurifier_ContentSets::generateChildDef ( &$  def,
module 
)

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

Parameters:
$def HTMLPurifier_ElementDef reference
$module Module that defined the ElementDef

Definition at line 74 of file ContentSets.php.

References 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:
$def HTMLPurifier_ElementDef to have ChildDef extracted
Returns:
HTMLPurifier_ChildDef corresponding to ElementDef

Definition at line 92 of file ContentSets.php.

Referenced by generateChildDef().

HTMLPurifier_ContentSets::convertToLookup ( string  )  [protected]

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

Parameters:
$string List of elements
Returns:
Lookup array of elements

Definition at line 132 of file ContentSets.php.

Referenced by __construct().

HTMLPurifier_ContentSets::generateChildDef ( &$  def,
module 
)

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

Parameters:
$def HTMLPurifier_ElementDef reference
$module Module that defined the ElementDef

Definition at line 2008 of file HTMLPurifier.standalone.php.

References 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:
$def HTMLPurifier_ElementDef to have ChildDef extracted
Returns:
HTMLPurifier_ChildDef corresponding to ElementDef

Definition at line 2026 of file HTMLPurifier.standalone.php.

HTMLPurifier_ContentSets::convertToLookup ( string  )  [protected]

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

Parameters:
$string List of elements
Returns:
Lookup array of elements

Definition at line 2066 of file HTMLPurifier.standalone.php.


Member Data Documentation

HTMLPurifier_ContentSets::$info = array()

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

Definition at line 12 of file ContentSets.php.

HTMLPurifier_ContentSets::$lookup = array()

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

Note:
This is in HTMLPurifier_HTMLDefinition->info_content_sets

Definition at line 18 of file ContentSets.php.

HTMLPurifier_ContentSets::$keys = array() [protected]

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

Definition at line 23 of file ContentSets.php.

HTMLPurifier_ContentSets::$values = array() [protected]

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

Definition at line 27 of file ContentSets.php.


The documentation for this class was generated from the following files:
Generated on Thu Jun 19 18:47:30 2008 for HTMLPurifier by  doxygen 1.5.3