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)) {
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])) {
$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...
Create styles array
The data for the language used.
_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...