XOOPS API 2.5.11 Beta1  UI v0.5
Réalisé par monxoops.fr
Référence de la classe HTMLPurifier_Injector
+ Graphe d'héritage de HTMLPurifier_Injector:

Fonctions membres publiques

 rewindOffset ($offset)
 
 getRewindOffset ()
 
 prepare ($config, $context)
 
 checkNeeded ($config)
 
 allowsElement ($name)
 
 handleText (&$token)
 
 handleElement (&$token)
 
 handleEnd (&$token)
 
 notifyEnd ($token)
 

Champs de données

 $name
 
 $needed = array()
 

Fonctions membres protégées

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

Attributs protégés

 $htmlDefinition
 
 $currentNesting
 
 $currentToken
 
 $inputZipper
 
 $rewindOffset = false
 

Description détaillée

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.

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

Documentation des fonctions membres

◆ allowsElement()

allowsElement (   $name)

Tests if the context node allows a certain element

Paramètres
string$nameName of element to test for
Renvoie
bool True if element is allowed, false if it is not
+ Voici le graphe des appelants de cette fonction :

◆ backward()

backward ( $i,
$current 
)
protected

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

Avertissement
Please prevent previous references from interfering with this functions by setting $i = null beforehand!
Paramètres
int$iCurrent integer index variable for inputTokens
HTMLPurifier_Token$currentCurrent token variable. Do NOT use $token, as that variable is also a reference
Renvoie
bool
+ Voici le graphe des appelants de cette fonction :

◆ checkNeeded()

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.

Paramètres
HTMLPurifier_Config$config
Renvoie
bool|string Boolean false if success, string of missing needed element/attribute if failure
+ Voici le graphe des appelants de cette fonction :

◆ forward()

forward ( $i,
$current 
)
protected

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

Avertissement
Please prevent previous references from interfering with this functions by setting $i = null beforehand!
Paramètres
int$iCurrent integer index variable for inputTokens
HTMLPurifier_Token$currentCurrent token variable. Do NOT use $token, as that variable is also a reference
Renvoie
bool
+ Voici le graphe des appelants de cette fonction :

◆ forwardUntilEndToken()

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.

Paramètres
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
Renvoie
bool
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

◆ getRewindOffset()

getRewindOffset ( )

Retrieves rewind offset, and then unsets it.

Renvoie
bool|int
+ Voici le graphe d'appel pour cette fonction :

◆ handleElement()

handleElement ( $token)

◆ handleEnd()

handleEnd ( $token)

Handler that is called when an end token is processed

Réimplémentée dans HTMLPurifier_Injector_SafeObject, HTMLPurifier_Injector_RemoveSpansWithoutAttributes, et HTMLPurifier_Injector_DisplayLinkURI.

+ Voici le graphe d'appel pour cette fonction :

◆ handleText()

handleText ( $token)

Handler that is called when a text token is processed

Réimplémentée dans HTMLPurifier_Injector_PurifierLinkify, HTMLPurifier_Injector_AutoParagraph, et HTMLPurifier_Injector_Linkify.

◆ notifyEnd()

notifyEnd (   $token)

Notifier that is called when an end token is processed

Paramètres
HTMLPurifier_Token$tokenCurrent token variable.
Note
This differs from handlers in that the token is read-only
Obsolète:
+ Voici le graphe des appelants de cette fonction :

◆ prepare()

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()).

Paramètres
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Renvoie
bool|string Boolean false if success, string of missing needed element/attribute if failure

Réimplémentée dans HTMLPurifier_Injector_SafeObject, HTMLPurifier_Injector_RemoveEmpty, HTMLPurifier_Injector_RemoveSpansWithoutAttributes, et HTMLPurifier_Injector_PurifierLinkify.

+ Voici le graphe d'appel pour cette fonction :

◆ rewindOffset()

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.

Paramètres
bool | int$offset
Avertissement
HTML Purifier will prevent you from fast-forwarding with this function.
+ Voici le graphe des appelants de cette fonction :

Documentation des champs

◆ $currentNesting

$currentNesting
protected

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

◆ $currentToken

$currentToken
protected

Reference to current token. @type HTMLPurifier_Token

◆ $htmlDefinition

$htmlDefinition
protected

◆ $inputZipper

$inputZipper
protected

Reference to InputZipper variable in Context. @type HTMLPurifier_Zipper

◆ $name

$name

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

◆ $needed

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

◆ $rewindOffset

$rewindOffset = false
protected

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


La documentation de cette classe a été générée à partir du fichier suivant :