\HTMLPurifier_ElementDef
Structure that stores an HTML element definition. Used by HTMLPurifier_HTMLDefinition and HTMLPurifier_HTMLModule.
Synopsis
class HTMLPurifier_ElementDef
{
- // members
- public boolean $standalone = true;
- public array $attr = ;
- public array $attr_transform_pre = ;
- public array $attr_transform_post = ;
- public $child;
- public $content_model;
- public $content_model_type;
- public boolean $descendants_are_inline = false;
- public array $required_attr = ;
- public array $excludes = ;
- public array $autoclose = ;
- public $wrap;
- public $formatting;
- // methods
- public static void create()
- public void mergeIn()
- private void _mergeAssocArray()
Members
public
-
$attr
Associative array of attribute name to HTMLPurifier_AttrDef -
$attr_transform_post
Indexed list of tag's HTMLPurifier_AttrTransform to be done after validation -
$attr_transform_pre
Indexed list of tag's HTMLPurifier_AttrTransform to be done before validation -
$autoclose
This tag is explicitly auto-closed by the following tags. -
$child
HTMLPurifier_ChildDef of this tag. -
$content_model
Abstract string representation of internal ChildDef rules. See HTMLPurifier_ContentSets for how this is parsed and then transformed into an HTMLPurifier_ChildDef. -
$content_model_type
Value of $child->type, used to determine which ChildDef to use, used in combination with $content_model. -
$descendants_are_inline
Does the element have a content model (#PCDATA | Inline)*? This is important for chameleon ins and del processing in HTMLPurifier_ChildDef_Chameleon. Dynamically set: modules don't have to worry about this one. -
$excludes
Lookup table of tags excluded from all descendants of this tag. -
$formatting
Whether or not this is a formatting element affected by the "Active Formatting Elements" algorithm. -
$required_attr
List of the names of required attributes this element has. Dynamically populated by HTMLPurifier_HTMLDefinition::getElement -
$standalone
Does the definition work by itself, or is it created solely for the purpose of merging into another definition? -
$wrap
If a foreign element is found in this element, test if it is allowed by this sub-element; if it is, instead of closing the current element, place it inside this element.