HTMLPurifier_Injector Klassenreferenz

HTMLPurifier_Injector Klassenreferenz
Klassendiagramm für HTMLPurifier_Injector:

Öffentliche Methoden

 rewindOffset ($offset)
 
 getRewindOffset ()
 
 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)
 

Geschützte Attribute

 $htmlDefinition
 
 $currentNesting
 
 $currentToken
 
 $inputZipper
 
 $rewindOffset = 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
string$nameName of element to test for
Rückgabe
bool True if element is allowed, false if it is not

Definiert in Zeile 147 der Datei Injector.php.

Benutzt $name.

Wird benutzt von HTMLPurifier_Injector_AutoParagraph\handleElement(), HTMLPurifier_Injector_Linkify\handleText(), HTMLPurifier_Injector_AutoParagraph\handleText() und HTMLPurifier_Injector_PurifierLinkify\handleText().

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
int$iCurrent integer index variable for inputTokens
HTMLPurifier_Token$currentCurrent token variable. Do NOT use $token, as that variable is also a reference
Rückgabe
bool

Definiert in Zeile 234 der Datei Injector.php.

Wird benutzt von HTMLPurifier_Injector_AutoParagraph\handleElement().

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
HTMLPurifier_Config$config
Rückgabe
bool|string Boolean false if success, string of missing needed element/attribute if failure

Definiert in Zeile 120 der Datei Injector.php.

Benutzt $name.

Wird benutzt von prepare().

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

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
int$iCurrent integer index variable for inputTokens
HTMLPurifier_Token$currentCurrent token variable. Do NOT use $token, as that variable is also a reference
Rückgabe
bool

Definiert in Zeile 180 der Datei Injector.php.

Wird benutzt von forwardUntilEndToken().

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.

Parameter
int$iCurrent integer index variable for inputTokens
HTMLPurifier_Token$currentCurrent token variable. Do NOT use $token, as that variable is also a reference
int$nesting
Rückgabe
bool

Definiert in Zeile 204 der Datei Injector.php.

Benutzt forward().

Wird benutzt von HTMLPurifier_Injector_AutoParagraph\_pLookAhead(), HTMLPurifier_Injector_RemoveSpansWithoutAttributes\handleElement() und HTMLPurifier_Injector_AutoParagraph\handleText().

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

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

getRewindOffset ( )

Retrieves rewind offset, and then unsets it.

Rückgabe
bool|int

Definiert in Zeile 81 der Datei Injector.php.

Benutzt $rewindOffset und rewindOffset().

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

handleElement ( $token)

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

Definiert in Zeile 258 der Datei Injector.php.

handleEnd ( $token)

Handler that is called when an end token is processed

Definiert in Zeile 265 der Datei Injector.php.

Benutzt notifyEnd().

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

handleText ( $token)

Handler that is called when a text token is processed

Definiert in Zeile 251 der Datei Injector.php.

notifyEnd (   $token)

Notifier that is called when an end token is processed

Parameter
HTMLPurifier_Token$tokenCurrent token variable.
Zu beachten
This differs from handlers in that the token is read-only
Veraltet:

Definiert in Zeile 276 der Datei Injector.php.

Wird benutzt von handleEnd().

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
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Rückgabe
bool|string Boolean false if success, string of missing needed element/attribute if failure

Definiert in Zeile 97 der Datei Injector.php.

Benutzt checkNeeded().

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

rewindOffset (   $offset)

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.

Parameter
bool | int$offset
Warnung
HTML Purifier will prevent you from fast-forwarding with this function.

Definiert in Zeile 72 der Datei Injector.php.

Wird benutzt von getRewindOffset() und HTMLPurifier_Injector_RemoveEmpty\handleElement().

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

Definiert in Zeile 35 der Datei Injector.php.

$currentToken
protected

Reference to current token. HTMLPurifier_Token

Definiert in Zeile 41 der Datei Injector.php.

$htmlDefinition
protected

HTMLPurifier_HTMLDefinition

Definiert in Zeile 28 der Datei Injector.php.

$inputZipper
protected

Reference to InputZipper variable in Context. HTMLPurifier_Zipper

Definiert in Zeile 47 der Datei Injector.php.

$name

Advisory name of injector, this is for friendly error messages. string

Definiert in Zeile 23 der Datei Injector.php.

Wird benutzt von allowsElement() und checkNeeded().

$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') array

Definiert in Zeile 55 der Datei Injector.php.

$rewindOffset = false
protected

Number of elements to rewind backwards (relative). bool|int

Definiert in Zeile 61 der Datei Injector.php.

Wird benutzt von getRewindOffset().


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.