Class HTMLPurifier_HTMLModule

Description

Represents an XHTML 1. and attributes.

Represents an XHTML 1.1 module, with information on elements, tags and attributes.

  • todo: Consider making some member functions protected

Located in /library/HTMLPurifier/HTMLModule.php (line 18)


	
			
Direct descendents
Class Description
HTMLPurifier_HTMLModule_Bdo XHTML 1. declare directionality of content.
HTMLPurifier_HTMLModule_CommonAttributes Represents an XHTML 1. and attributes.
HTMLPurifier_HTMLModule_Edit XHTML 1. Module.
HTMLPurifier_HTMLModule_Hypertext XHTML 1.
HTMLPurifier_HTMLModule_Image XHTML 1.
HTMLPurifier_HTMLModule_Legacy XHTML 1. deprecated.
HTMLPurifier_HTMLModule_List XHTML 1.
HTMLPurifier_HTMLModule_NonXMLCommonAttributes Represents an XHTML 1. and attributes.
HTMLPurifier_HTMLModule_Object XHTML 1.
HTMLPurifier_HTMLModule_Presentation XHTML 1. markup.
HTMLPurifier_HTMLModule_Proprietary Module defines proprietary tags and attributes in HTML.
HTMLPurifier_HTMLModule_Ruby XHTML 1. short runs of text alongside base text for annotation or pronounciation.
HTMLPurifier_HTMLModule_SafeEmbed A "safe" embed module.
HTMLPurifier_HTMLModule_SafeObject A "safe" object module. be safe, and untrusted users can be allowed to embed arbitrary flash objects (maybe other types too, but only Flash is supported as of right now).
HTMLPurifier_HTMLModule_Scripting XHTML 1. information pertaining to executable scripts or the lack of support for executable scripts.
HTMLPurifier_HTMLModule_StyleAttribute XHTML 1. Module.
HTMLPurifier_HTMLModule_Tables XHTML 1.
HTMLPurifier_HTMLModule_Target XHTML 1.
HTMLPurifier_HTMLModule_Text XHTML 1.
HTMLPurifier_HTMLModule_Tidy Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
HTMLPurifier_HTMLModule_XMLCommonAttributes Represents an XHTML 1. and attributes.
Variable Summary
Method Summary
Created addBlankElement ($element $element)
Created addElement ($element $element, $type $type, $contents $contents, [$attr_includes $attr_includes = array()], [$attr $attr = array()])
void addElementToContentSet (Element $element, Name $type)
Lookup makeLookup ($list $list)
void mergeInAttrIncludes ($attr &$attr, $attr_includes $attr_includes)
void parseContents ($contents $contents)
void setup ($config $config)
Variables
mixed $attr_collections = array() (line 57)

Associative array of attribute collection names to attribute collection additions. the global collections. the style attribute to the Core. attr_collections->info, since the object's data is only info, with extra behavior associated with it.

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.

  • access: public

Redefined in descendants as:
mixed $content_sets = array() (line 47)

Associative array of content set names to content set additions.

Associative array of content set names to content set additions. This is commonly used to, say, add an A element to the Inline content set. This corresponds to an internal variable $content_sets and NOT info_content_sets member variable of HTMLDefinition.

  • access: public

Redefined in descendants as:
mixed $defines_child_def = false (line 88)

Boolean flag that indicates whether or not getChildDef is implemented.

Boolean flag that indicates whether or not getChildDef is implemented. For optimization reasons: may save a call to a function. Be sure to set it if you do implement getChildDef(), otherwise it will have no effect!

  • access: public

Redefined in descendants as:
mixed $elements = array() (line 32)

Informally, a list of elements this module changes. any significant way.

Informally, a list of elements this module changes. Not used in any significant way.

  • access: public

Redefined in descendants as:
mixed $info = array() (line 39)

Associative array of element names to element definitions.

Associative array of element names to element definitions. Some definitions may be incomplete, to be merged in later with the full definition.

  • access: public
mixed $info_attr_transform_post = array() (line 72)

List of HTMLPurifier_AttrTransform to be performed after validation.

List of HTMLPurifier_AttrTransform to be performed after validation.

  • access: public
mixed $info_attr_transform_pre = array() (line 67)

List of HTMLPurifier_AttrTransform to be performed before validation.

List of HTMLPurifier_AttrTransform to be performed before validation.

  • access: public
mixed $info_injector = array() (line 80)

List of HTMLPurifier_Injector to be performed during well-formedness fixing.

List of HTMLPurifier_Injector to be performed during well-formedness fixing. An injector will only be invoked if all of it's pre-requisites are met; if an injector fails setup, there will be no error; it will simply be silently disabled.

  • access: public
mixed $info_tag_transform = array() (line 62)

Associative array of deprecated tag name to HTMLPurifier_TagTransform

Associative array of deprecated tag name to HTMLPurifier_TagTransform

  • access: public
mixed $safe = true (line 102)

Boolean flag whether or not this module is 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")

  • access: public

Redefined in descendants as:
Methods
addBlankElement (line 153)

Convenience function that creates a totally blank, non-standalone element.

Convenience function that creates a totally blank, non-standalone element.

  • return: element
  • access: public
Created addBlankElement ($element $element)
  • $element $element: Name of element to create
addElement (line 130)

Convenience function that sets up a new element

Convenience function that sets up a new element

  • return: element definition object, so you can set advanced parameters
  • access: public
Created addElement ($element $element, $type $type, $contents $contents, [$attr_includes $attr_includes = array()], [$attr $attr = array()])
  • $element $element: Name of element to add
  • $type $type: What content set should element be registered to? Set as false to skip this step.
  • $contents $contents: Allowed children in form of: "$content_model_type: $content_model"
  • $attr_includes $attr_includes: What attribute collections to register to element?
  • $attr $attr: What unique attributes does the element define?
addElementToContentSet (line 170)

Convenience function that registers an element to a content set

Convenience function that registers an element to a content set

  • access: public
void addElementToContentSet (Element $element, Name $type)
  • Element $element: to register
  • Name $type: content set (warning: case sensitive, usually upper-case first letter)
getChildDef (line 112)

Retrieves a proper HTMLPurifier_ChildDef subclass based on content_model and content_model_type member variables of the HTMLPurifier_ElementDef class. in HTMLPurifier_HTMLDefinition.

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.

  • return: subclass
  • access: public
HTMLPurifier_ChildDef getChildDef ($def $def)
  • $def $def: HTMLPurifier_ElementDef instance

Redefined in descendants as:
makeLookup (line 224)

Convenience function that generates a lookup table with boolean true as value.

Convenience function that generates a lookup table with boolean true as value.

  • return: array equivalent of list
  • access: public
Lookup makeLookup ($list $list)
  • $list $list: List of values to turn into a lookup
mergeInAttrIncludes (line 208)

Convenience function that merges a list of attribute includes into an attribute array.

Convenience function that merges a list of attribute includes into an attribute array.

  • access: public
void mergeInAttrIncludes ($attr &$attr, $attr_includes $attr_includes)
  • $attr &$attr: Reference to attr array to modify
  • $attr_includes $attr_includes: Array of includes / string include to merge in
parseContents (line 185)

Convenience function that transforms single-string contents

Convenience function that transforms single-string contents into separate content model and content model type

  • access: public
void parseContents ($contents $contents)
  • $contents $contents: Allowed children in form of: "$content_model_type: $content_model"
setup (line 240)

Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available.

Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available.

  • access: public
void setup ($config $config)
  • $config $config: Instance of HTMLPurifier_Config

Redefined in descendants as:

Documentation generated on Thu, 19 Jun 2008 18:49:30 -0400 by phpDocumentor 1.4.2