HTMLPurifier_Injector Klassenreferenz

Klassendiagramm für HTMLPurifier_Injector:

Inheritance graph
[Legende]

Öffentliche Methoden

 rewind ($index)
 getRewind ()
 prepare ($config, $context)
 checkNeeded ($config)
 allowsElement ($name)
 handleText (&$token)
 handleElement (&$token)
 handleEnd (&$token)
 notifyEnd ($token)

Datenfelder

 $name
 $needed = array()

Geschützte Methoden

 forward (&$i, &$current)
 forwardUntilEndToken (&$i, &$current, &$nesting)
 backward (&$i, &$current)
 current (&$i, &$current)

Geschützte Attribute

 $htmlDefinition
 $currentNesting
 $inputTokens
 $inputIndex
 $rewind = false

Ausführliche Beschreibung

Injects tokens into the document while parsing for well-formedness. This enables "formatter-like" functionality such as auto-paragraphing, smiley-ification and linkification to take place.

A note on how handlers create changes; this is done by assigning a new value to the $token reference. These values can take a variety of forms and are best described HTMLPurifier_Strategy_MakeWellFormed->processToken() documentation.

Noch zu erledigen:
Allow injectors to request a re-run on their output. This would help if an operation is recursive.

Definiert in Zeile 16 der Datei Injector.php.


Dokumentation der Elementfunktionen

allowsElement ( name  ) 

Tests if the context node allows a certain element

Parameter:
$name Name of element to test for
Rückgabe:
True if element is allowed, false if it is not

Definiert in Zeile 129 der Datei Injector.php.

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

backward ( &$  i,
&$  current 
) [protected]

Iterator function, starts with the previous token and continues until you reach the beginning of input tokens.

Warnung:
Please prevent previous references from interfering with this functions by setting $i = null beforehand!
Parameter:
&$i Current integer index variable for inputTokens
&$current Current token variable. Do NOT use $token, as that variable is also a reference

Definiert in Zeile 190 der Datei Injector.php.

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

checkNeeded ( config  ) 

This function checks if the HTML environment will work with the Injector: if p tags are not allowed, the Auto-Paragraphing injector should not be enabled.

Parameter:
$config Instance of HTMLPurifier_Config
$context Instance of HTMLPurifier_Context
Rückgabe:
Boolean false if success, string of missing needed element/attribute if failure

Definiert in Zeile 111 der Datei Injector.php.

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

current ( &$  i,
&$  current 
) [protected]

Initializes the iterator at the current position. Use in a do {} while; loop to force the _forward and _backward functions to start at the current location.

Warnung:
Please prevent previous references from interfering with this functions by setting $i = null beforehand!
Parameter:
&$i Current integer index variable for inputTokens
&$current Current token variable. Do NOT use $token, as that variable is also a reference

Definiert in Zeile 207 der Datei Injector.php.

forward ( &$  i,
&$  current 
) [protected]

Iterator function, which starts with the next token and continues until you reach the end of the input tokens.

Warnung:
Please prevent previous references from interfering with this functions by setting $i = null beforehand!
Parameter:
&$i Current integer index variable for inputTokens
&$current Current token variable. Do NOT use $token, as that variable is also a reference

Definiert in Zeile 157 der Datei Injector.php.

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

forwardUntilEndToken ( &$  i,
&$  current,
&$  nesting 
) [protected]

Similar to _forward, but accepts a third parameter $nesting (which should be initialized at 0) and stops when we hit the end tag for the node $this->inputIndex starts in.

Definiert in Zeile 170 der Datei Injector.php.

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

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

getRewind (  ) 

Retrieves rewind, and then unsets it.

Definiert in Zeile 75 der Datei Injector.php.

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

handleElement ( &$  token  ) 

Handler that is called when a start or empty token is processed

Erneute Implementation in HTMLPurifier_Injector_AutoParagraph, HTMLPurifier_Injector_DisplayLinkURI, HTMLPurifier_Injector_RemoveEmpty und HTMLPurifier_Injector_SafeObject.

Definiert in Zeile 220 der Datei Injector.php.

handleEnd ( &$  token  ) 

Handler that is called when an end token is processed

Erneute Implementation in HTMLPurifier_Injector_DisplayLinkURI und HTMLPurifier_Injector_SafeObject.

Definiert in Zeile 225 der Datei Injector.php.

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

handleText ( &$  token  ) 

Handler that is called when a text token is processed

Erneute Implementation in HTMLPurifier_Injector_AutoParagraph, HTMLPurifier_Injector_Linkify und HTMLPurifier_Injector_PurifierLinkify.

Definiert in Zeile 215 der Datei Injector.php.

notifyEnd ( token  ) 

Notifier that is called when an end token is processed

Zu beachten:
This differs from handlers in that the token is read-only
Veraltet:

Definiert in Zeile 234 der Datei Injector.php.

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

prepare ( config,
context 
)

Prepares the injector by giving it the config and context objects: this allows references to important variables to be made within the injector. This function also checks if the HTML environment will work with the Injector (see checkNeeded()).

Parameter:
$config Instance of HTMLPurifier_Config
$context Instance of HTMLPurifier_Context
Rückgabe:
Boolean false if success, string of missing needed element/attribute if failure

Erneute Implementation in HTMLPurifier_Injector_PurifierLinkify, HTMLPurifier_Injector_RemoveEmpty und HTMLPurifier_Injector_SafeObject.

Definiert in Zeile 90 der Datei Injector.php.

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

rewind ( index  ) 

Rewind to a spot to re-perform processing. This is useful if you deleted a node, and now need to see if this change affected any earlier nodes. Rewinding does not affect other injectors, and can result in infinite loops if not used carefully.

Warnung:
HTML Purifier will prevent you from fast-forwarding with this function.

Definiert in Zeile 68 der Datei Injector.php.

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


Dokumentation der Datenelemente

$currentNesting [protected]

Reference to CurrentNesting variable in Context. This is an array list of tokens that we are currently "inside"

Definiert in Zeile 33 der Datei Injector.php.

$htmlDefinition [protected]

Instance of HTMLPurifier_HTMLDefinition

Definiert in Zeile 27 der Datei Injector.php.

$inputIndex [protected]

Reference to InputIndex variable in Context. This is an integer array index for $this->inputTokens that indicates what token is currently being processed.

Definiert in Zeile 46 der Datei Injector.php.

$inputTokens [protected]

Reference to InputTokens variable in Context. This is an array list of the input tokens that are being processed.

Definiert in Zeile 39 der Datei Injector.php.

$name

Advisory name of injector, this is for friendly error messages

Erneute Implementation in HTMLPurifier_Injector_AutoParagraph, HTMLPurifier_Injector_DisplayLinkURI, HTMLPurifier_Injector_Linkify, HTMLPurifier_Injector_PurifierLinkify und HTMLPurifier_Injector_SafeObject.

Definiert in Zeile 22 der Datei Injector.php.

$needed = array()

Array of elements and attributes this injector creates and therefore need to be allowed by the definition. Takes form of array('element' => array('attr', 'attr2'), 'element2')

Erneute Implementation in HTMLPurifier_Injector_AutoParagraph, HTMLPurifier_Injector_DisplayLinkURI, HTMLPurifier_Injector_Linkify, HTMLPurifier_Injector_PurifierLinkify und HTMLPurifier_Injector_SafeObject.

Definiert in Zeile 53 der Datei Injector.php.

$rewind = false [protected]

Index of inputTokens to rewind to.

Definiert in Zeile 58 der Datei Injector.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