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