HTMLPurifier_HTMLModule Klassenreferenz

Klassendiagramm für HTMLPurifier_HTMLModule:

Inheritance graph
[Legende]

Öffentliche Methoden

 getChildDef ($def)
 addElement ($element, $type, $contents, $attr_includes=array(), $attr=array())
 addBlankElement ($element)
 addElementToContentSet ($element, $type)
 parseContents ($contents)
 mergeInAttrIncludes (&$attr, $attr_includes)
 makeLookup ($list)
 setup ($config)

Datenfelder

 $name
 $elements = array()
 $info = array()
 $content_sets = array()
 $attr_collections = array()
 $info_tag_transform = array()
 $info_attr_transform_pre = array()
 $info_attr_transform_post = array()
 $info_injector = array()
 $defines_child_def = false
 $safe = true

Ausführliche Beschreibung

Represents an XHTML 1.1 module, with information on elements, tags and attributes.
Zu beachten:
Even though this is technically XHTML 1.1, it is also used for regular HTML parsing. We are using modulization as a convenient way to represent the internals of HTMLDefinition, and our implementation is by no means conforming and does not directly use the normative DTDs or XML schemas.

The public variables in a module should almost directly correspond to the variables in HTMLPurifier_HTMLDefinition. However, the prefix info carries no special meaning in these objects (include it anyway if that's the correspondence though).

Noch zu erledigen:
Consider making some member functions protected

Definiert in Zeile 18 der Datei HTMLModule.php.


Dokumentation der Elementfunktionen

addBlankElement ( element  ) 

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

Parameter:
$element Name of element to create
Rückgabe:
Created element

Definiert in Zeile 153 der Datei HTMLModule.php.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

addElement ( element,
type,
contents,
attr_includes = array(),
attr = array() 
)

Convenience function that sets up a new element

Parameter:
$element Name of element to add
$type What content set should element be registered to? Set as false to skip this step.
$contents Allowed children in form of: "$content_model_type: $content_model"
$attr_includes What attribute collections to register to element?
$attr What unique attributes does the element define?
Zu beachten:
See ElementDef for in-depth descriptions of these parameters.
Rückgabe:
Created element definition object, so you can set advanced parameters

Definiert in Zeile 130 der Datei HTMLModule.php.

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

addElementToContentSet ( element,
type 
)

Convenience function that registers an element to a content set

Parameter:
Element to register
Name content set (warning: case sensitive, usually upper-case first letter)

Definiert in Zeile 170 der Datei HTMLModule.php.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

getChildDef ( def  ) 

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.

Parameter:
$def HTMLPurifier_ElementDef instance
Rückgabe:
HTMLPurifier_ChildDef subclass

Erneute Implementation in HTMLPurifier_HTMLModule_Edit und HTMLPurifier_HTMLModule_Tidy_Strict.

Definiert in Zeile 112 der Datei HTMLModule.php.

makeLookup ( list  ) 

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

Parameter:
$list List of values to turn into a lookup
Zu beachten:
You can also pass an arbitrary number of arguments in place of the regular argument
Rückgabe:
Lookup array equivalent of list

Definiert in Zeile 224 der Datei HTMLModule.php.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

mergeInAttrIncludes ( &$  attr,
attr_includes 
)

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

Parameter:
$attr Reference to attr array to modify
$attr_includes Array of includes / string include to merge in

Definiert in Zeile 208 der Datei HTMLModule.php.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

parseContents ( contents  ) 

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

Parameter:
$contents Allowed children in form of: "$content_model_type: $content_model"
Zu beachten:
If contents is an object, an array of two nulls will be returned, and the callee needs to take the original $contents and use it directly.

Definiert in Zeile 185 der Datei HTMLModule.php.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

setup ( config  ) 


Dokumentation der Datenelemente

$attr_collections = array()

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.

Erneute Implementation in HTMLPurifier_HTMLModule_Bdo, HTMLPurifier_HTMLModule_CommonAttributes, HTMLPurifier_HTMLModule_NonXMLCommonAttributes, HTMLPurifier_HTMLModule_StyleAttribute und HTMLPurifier_HTMLModule_XMLCommonAttributes.

Definiert in Zeile 57 der Datei HTMLModule.php.

$content_sets = array()

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.

Erneute Implementation in HTMLPurifier_HTMLModule_Forms, HTMLPurifier_HTMLModule_List, HTMLPurifier_HTMLModule_Scripting und HTMLPurifier_HTMLModule_Text.

Definiert in Zeile 47 der Datei HTMLModule.php.

$defines_child_def = false

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!

Erneute Implementation in HTMLPurifier_HTMLModule_Edit und HTMLPurifier_HTMLModule_Tidy_Strict.

Definiert in Zeile 88 der Datei HTMLModule.php.

$elements = array()

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

Erneute Implementation in HTMLPurifier_HTMLModule_Scripting.

Definiert in Zeile 32 der Datei HTMLModule.php.

$info = array()

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

Definiert in Zeile 39 der Datei HTMLModule.php.

$info_attr_transform_post = array()

List of HTMLPurifier_AttrTransform to be performed after validation.

Definiert in Zeile 72 der Datei HTMLModule.php.

$info_attr_transform_pre = array()

List of HTMLPurifier_AttrTransform to be performed before validation.

Definiert in Zeile 67 der Datei HTMLModule.php.

$info_injector = array()

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.

Definiert in Zeile 80 der Datei HTMLModule.php.

$info_tag_transform = array()

Associative array of deprecated tag name to HTMLPurifier_TagTransform

Definiert in Zeile 62 der Datei HTMLModule.php.

$name

$safe = true

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")

Zu beachten:
Previously, safety could be applied at an element level granularity. We've removed this ability, so in order to add "unsafe" elements or attributes, a dedicated module with this property set to false must be used.

Erneute Implementation in HTMLPurifier_HTMLModule_Forms, HTMLPurifier_HTMLModule_Object und HTMLPurifier_HTMLModule_Scripting.

Definiert in Zeile 102 der Datei HTMLModule.php.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen