\HTMLPurifier_ElementDef

Structure that stores an HTML element definition. Used by HTMLPurifier_HTMLDefinition and HTMLPurifier_HTMLModule.

Summary

Methods
Properties
Constants
create()
mergeIn()
$standalone
$attr
$attr_transform_pre
$attr_transform_post
$child
$content_model
$content_model_type
$descendants_are_inline
$required_attr
$excludes
$autoclose
$wrap
$formatting
No constants found
No protected methods found
No protected properties found
N/A
_mergeAssocArray()
No private properties found
N/A

Properties

$standalone

$standalone : 

Does the definition work by itself, or is it created solely for the purpose of merging into another definition?

Type

$attr

$attr : 

Associative array of attribute name to HTMLPurifier_AttrDef.

Type

$attr_transform_pre

$attr_transform_pre : 

List of tags HTMLPurifier_AttrTransform to be done before validation.

Type

$attr_transform_post

$attr_transform_post : 

List of tags HTMLPurifier_AttrTransform to be done after validation.

Type

$child

$child : 

HTMLPurifier_ChildDef of this tag.

Type

$content_model

$content_model : 

Abstract string representation of internal ChildDef rules.

Type

$content_model_type

$content_model_type : 

Value of $child->type, used to determine which ChildDef to use, used in combination with $content_model.

Type

$descendants_are_inline

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

Type

$required_attr

$required_attr : 

List of the names of required attributes this element has.

Dynamically populated by HTMLPurifier_HTMLDefinition::getElement()

Type

$excludes

$excludes : 

Lookup table of tags excluded from all descendants of this tag.

Type

$autoclose

$autoclose : 

This tag is explicitly auto-closed by the following tags.

Type

$wrap

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

Type

$formatting

$formatting : 

Whether or not this is a formatting element affected by the "Active Formatting Elements" algorithm.

Type

Methods

create()

create(  $content_model,   $content_model_type,   $attr) 

Low-level factory constructor for creating new standalone element defs

Parameters

$content_model
$content_model_type
$attr

mergeIn()

mergeIn(\HTMLPurifier_ElementDef  $def) 

Merges the values of another element definition into this one.

Values from the new element def take precedence if a value is not mergeable.

Parameters

\HTMLPurifier_ElementDef $def

_mergeAssocArray()

_mergeAssocArray(  $a1,   $a2) 

Merges one array into another, removes values which equal false

Parameters

$a1

Array by reference that is merged into

$a2

Array that merges into $a1