156        foreach (
$def->attr as $k => $v) {
 
  160                foreach ($v as $v2) {
 
  161                    $this->attr[0][] = $v2;
 
  166                if (isset($this->attr[$k])) {
 
  167                    unset($this->attr[$k]);
 
  171            $this->attr[$k] = $v;
 
  174        $this->attr_transform_pre = array_merge($this->attr_transform_pre, 
$def->attr_transform_pre);
 
  175        $this->attr_transform_post = array_merge($this->attr_transform_post, 
$def->attr_transform_post);
 
  177        if (!empty(
$def->content_model)) {
 
  178            $this->content_model =
 
  179                str_replace(
"#SUPER", $this->content_model, 
$def->content_model);
 
  180            $this->child = 
false;
 
  182        if (!empty(
$def->content_model_type)) {
 
  183            $this->content_model_type = 
$def->content_model_type;
 
  184            $this->child = 
false;
 
  186        if (!is_null(
$def->child)) {
 
  187            $this->child = 
$def->child;
 
  189        if (!is_null(
$def->formatting)) {
 
  190            $this->formatting = 
$def->formatting;
 
  192        if (
$def->descendants_are_inline) {
 
  193            $this->descendants_are_inline = 
$def->descendants_are_inline;
 
  204        foreach ($a2 as $k => $v) {
 
  206                if (isset($a1[$k])) {
 
An exception for terminatinating execution or to throw for unit testing.
Structure that stores an HTML element definition.
$content_model_type
Value of $child->type, used to determine which ChildDef to use, used in combination with $content_mod...
$autoclose
This tag is explicitly auto-closed by the following tags.
mergeIn($def)
Merges the values of another element definition into this one.
$attr
Associative array of attribute name to HTMLPurifier_AttrDef.
$attr_transform_post
List of tags HTMLPurifier_AttrTransform to be done after validation.
$standalone
Does the definition work by itself, or is it created solely for the purpose of merging into another d...
$required_attr
List of the names of required attributes this element has.
$content_model
Abstract string representation of internal ChildDef rules.
$attr_transform_pre
List of tags HTMLPurifier_AttrTransform to be done before validation.
$excludes
Lookup table of tags excluded from all descendants of this tag.
$wrap
If a foreign element is found in this element, test if it is allowed by this sub-element; if it is,...
$descendants_are_inline
Does the element have a content model (#PCDATA | Inline)*? This is important for chameleon ins and de...
$child
HTMLPurifier_ChildDef of this tag.
$formatting
Whether or not this is a formatting element affected by the "Active Formatting Elements" algorithm.
_mergeAssocArray(&$a1, $a2)
Merges one array into another, removes values which equal false.
static create($content_model, $content_model_type, $attr)
Low-level factory constructor for creating new standalone element defs.