API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_ElementDef Class Reference

Public Member Functions

 mergeIn ($def)
 

Static Public Member Functions

static create ($content_model, $content_model_type, $attr)
 

Data Fields

 $standalone = true
 
 $attr = array()
 
 $attr_transform_pre = array()
 
 $attr_transform_post = array()
 
 $child
 
 $content_model
 
 $content_model_type
 
 $descendants_are_inline = false
 
 $required_attr = array()
 
 $excludes = array()
 
 $autoclose = array()
 
 $wrap
 
 $formatting
 

Detailed Description

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

Note
This class is inspected by HTMLPurifier_Printer_HTMLDefinition. Please update that class too.
Warning
If you add new properties to this class, you MUST update the mergeIn() method.

Member Function Documentation

◆ create()

static create (   $content_model,
  $content_model_type,
  $attr 
)
static

Low-level factory constructor for creating new standalone element defs

Here is the caller graph for this function:

◆ mergeIn()

mergeIn (   $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

Field Documentation

◆ $attr

$attr = array()

Associative array of attribute name to HTMLPurifier_AttrDef. @type array

Note
Before being processed by HTMLPurifier_AttrCollections when modules are finalized during HTMLPurifier_HTMLDefinition->setup(), this array may also contain an array at index 0 that indicates which attribute collections to load into the full array. It may also contain string indentifiers in lieu of HTMLPurifier_AttrDef, see HTMLPurifier_AttrTypes on how they are expanded during HTMLPurifier_HTMLDefinition->setup() processing.

◆ $attr_transform_post

$attr_transform_post = array()

List of tags HTMLPurifier_AttrTransform to be done after validation. @type array

◆ $attr_transform_pre

$attr_transform_pre = array()

List of tags HTMLPurifier_AttrTransform to be done before validation. @type array

◆ $autoclose

$autoclose = array()

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

◆ $child

$child

◆ $content_model

$content_model

Abstract string representation of internal ChildDef rules.

See also
HTMLPurifier_ContentSets for how this is parsed and then transformed into an HTMLPurifier_ChildDef.
Warning
This is a temporary variable that is not available after being processed by HTMLDefinition @type string

◆ $content_model_type

$content_model_type

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

Warning
This must be lowercase
This is a temporary variable that is not available after being processed by HTMLDefinition @type string

◆ $descendants_are_inline

$descendants_are_inline = false

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 bool

◆ $excludes

$excludes = array()

Lookup table of tags excluded from all descendants of this tag. @type array

Note
SGML permits exclusions for all descendants, but this is not possible with DTDs or XML Schemas. W3C has elected to use complicated compositions of content_models to simulate exclusion for children, but we go the simpler, SGML-style route of flat-out exclusions, which correctly apply to all descendants and not just children. Note that the XHTML Modularization Abstract Modules are blithely unaware of such distinctions.

◆ $formatting

$formatting

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

◆ $required_attr

$required_attr = array()

List of the names of required attributes this element has. Dynamically populated by HTMLPurifier_HTMLDefinition::getElement() @type array

◆ $standalone

$standalone = true

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

◆ $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 string


The documentation for this class was generated from the following file: