\HTMLPurifier_HTMLModule_Image
XHTML 1.1 Image Module provides basic image embedding.
Synopsis
class HTMLPurifier_HTMLModule_Image
extends HTMLPurifier_HTMLModule
{
- // members
- public string $name = 'Image';
- // Inherited members from HTMLPurifier_HTMLModule
- public $name;
- public array $elements;
- public array $info;
- public array $content_sets;
- public array $attr_collections;
- public array $info_tag_transform;
- public array $info_attr_transform_pre;
- public array $info_attr_transform_post;
- public array $info_injector;
- public boolean $defines_child_def;
- public boolean $safe;
- // methods
- public void setup()
- // Inherited methods from HTMLPurifier_HTMLModule
- public HTMLPurifier_ChildDef getChildDef()
- public Created addElement()
- public Created addBlankElement()
- public void addElementToContentSet()
- public void parseContents()
- public void mergeInAttrIncludes()
- public Lookup makeLookup()
- public void setup()
Hierarchy
Extends
Members
public
-
$attr_collections
Associative array of attribute collection names to attribute collection additions. More rarely used for adding attributes to the global collections. Example is the StyleAttribute module adding the style attribute to the Core. Corresponds to HTMLDefinition's attr_collections->info, since the object's data is only info, with extra behavior associated with it. -
$content_sets
Associative array of content set names to content set additions. -
$defines_child_def
Boolean flag that indicates whether or not getChildDef is implemented. -
$elements
Informally, a list of elements this module changes. Not used in any significant way. -
$info
Associative array of element names to element definitions. -
$info_attr_transform_post
List of HTMLPurifier_AttrTransform to be performed after validation. -
$info_attr_transform_pre
List of HTMLPurifier_AttrTransform to be performed before validation. -
$info_injector
List of HTMLPurifier_Injector to be performed during well-formedness fixing. -
$info_tag_transform
Associative array of deprecated tag name to HTMLPurifier_TagTransform - $name
-
$name
Short unique string identifier of the module -
$safe
Boolean flag whether or not this module is safe. If it is not safe, all of its members are unsafe. Modules are safe by default (this might be slightly dangerous, but it doesn't make much sense to force HTML Purifier, which is based off of safe HTML, to explicitly say, "This is safe," even though there are modules which are "unsafe")
Methods
public
Inherited from HTMLPurifier_HTMLModule
public
- addBlankElement() — Convenience function that creates a totally blank, non-standalone element.
- addElement() — Convenience function that sets up a new element
- addElementToContentSet() — Convenience function that registers an element to a content set
- getChildDef() — Retrieves a proper HTMLPurifier_ChildDef subclass based on content_model and content_model_type member variables of the HTMLPurifier_ElementDef class. There is a similar function in HTMLPurifier_HTMLDefinition.
- makeLookup() — Convenience function that generates a lookup table with boolean true as value.
- mergeInAttrIncludes() — Convenience function that merges a list of attribute includes into an attribute array.
- parseContents() — Convenience function that transforms single-string contents into separate content model and content model type
- setup() — Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available.