HTMLPurifier_ElementDef
in package
Structure that stores an HTML element definition. Used by HTMLPurifier_HTMLDefinition and HTMLPurifier_HTMLModule.
Tags
Table of Contents
Properties
- $attr : mixed
- Associative array of attribute name to HTMLPurifier_AttrDef.
- $attr_transform_post : mixed
- List of tags HTMLPurifier_AttrTransform to be done after validation.
- $attr_transform_pre : mixed
- List of tags HTMLPurifier_AttrTransform to be done before validation.
- $autoclose : mixed
- This tag is explicitly auto-closed by the following tags.
- $child : mixed
- HTMLPurifier_ChildDef of this tag.
- $content_model : mixed
- Abstract string representation of internal ChildDef rules.
- $content_model_type : mixed
- Value of $child->type, used to determine which ChildDef to use, used in combination with $content_model.
- $descendants_are_inline : mixed
- 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 : mixed
- Lookup table of tags excluded from all descendants of this tag.
- $formatting : mixed
- Whether or not this is a formatting element affected by the "Active Formatting Elements" algorithm.
- $required_attr : mixed
- List of the names of required attributes this element has.
- $standalone : mixed
- Does the definition work by itself, or is it created solely for the purpose of merging into another definition?
- $wrap : mixed
- 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.
Methods
- create() : mixed
- Low-level factory constructor for creating new standalone element defs
- mergeIn() : mixed
- Merges the values of another element definition into this one.
- _mergeAssocArray() : mixed
- Merges one array into another, removes values which equal false
Properties
$attr
Associative array of attribute name to HTMLPurifier_AttrDef.
public
mixed
$attr
= array()
Tags
$attr_transform_post
List of tags HTMLPurifier_AttrTransform to be done after validation.
public
mixed
$attr_transform_post
= array()
Tags
$attr_transform_pre
List of tags HTMLPurifier_AttrTransform to be done before validation.
public
mixed
$attr_transform_pre
= array()
Tags
$autoclose
This tag is explicitly auto-closed by the following tags.
public
mixed
$autoclose
= array()
Tags
$child
HTMLPurifier_ChildDef of this tag.
public
mixed
$child
Tags
$content_model
Abstract string representation of internal ChildDef rules.
public
mixed
$content_model
Tags
$content_model_type
Value of $child->type, used to determine which ChildDef to use, used in combination with $content_model.
public
mixed
$content_model_type
Tags
$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.
public
mixed
$descendants_are_inline
= \false
Tags
$excludes
Lookup table of tags excluded from all descendants of this tag.
public
mixed
$excludes
= array()
Tags
$formatting
Whether or not this is a formatting element affected by the "Active Formatting Elements" algorithm.
public
mixed
$formatting
Tags
$required_attr
List of the names of required attributes this element has.
public
mixed
$required_attr
= array()
Dynamically populated by HTMLPurifier_HTMLDefinition::getElement()
Tags
$standalone
Does the definition work by itself, or is it created solely for the purpose of merging into another definition?
public
mixed
$standalone
= \true
Tags
$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.
public
mixed
$wrap
Tags
Methods
create()
Low-level factory constructor for creating new standalone element defs
public
static create(mixed $content_model, mixed $content_model_type, mixed $attr) : mixed
Parameters
- $content_model : mixed
- $content_model_type : mixed
- $attr : mixed
mergeIn()
Merges the values of another element definition into this one.
public
mergeIn(HTMLPurifier_ElementDef $def) : mixed
Values from the new element def take precedence if a value is not mergeable.
Parameters
- $def : HTMLPurifier_ElementDef
_mergeAssocArray()
Merges one array into another, removes values which equal false
private
_mergeAssocArray(mixed &$a1, mixed $a2) : mixed
Parameters
- $a1 : mixed
-
Array by reference that is merged into
- $a2 : mixed
-
Array that merges into $a1