| ILIAS
    release_5-3 Revision v5.3.23-19-g915713cf615
    | 
Injects tokens into the document while parsing for well-formedness. More...
 Inheritance diagram for HTMLPurifier_Injector:
 Inheritance diagram for HTMLPurifier_Injector: Collaboration diagram for HTMLPurifier_Injector:
 Collaboration diagram for HTMLPurifier_Injector:| Public Member Functions | |
| rewindOffset ($offset) | |
| Rewind to a spot to re-perform processing.  More... | |
| getRewindOffset () | |
| Retrieves rewind offset, and then unsets it.  More... | |
| 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.  More... | |
| 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.  More... | |
| allowsElement ($name) | |
| Tests if the context node allows a certain element.  More... | |
| handleText (&$token) | |
| Handler that is called when a text token is processed.  More... | |
| handleElement (&$token) | |
| Handler that is called when a start or empty token is processed.  More... | |
| handleEnd (&$token) | |
| Handler that is called when an end token is processed.  More... | |
| notifyEnd ($token) | |
| Notifier that is called when an end token is processed.  More... | |
| Data Fields | |
| $name | |
| Advisory name of injector, this is for friendly error messages.  More... | |
| $needed = array() | |
| Array of elements and attributes this injector creates and therefore need to be allowed by the definition.  More... | |
| Protected Member Functions | |
| forward (&$i, &$current) | |
| Iterator function, which starts with the next token and continues until you reach the end of the input tokens.  More... | |
| forwardUntilEndToken (&$i, &$current, &$nesting) | |
| 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.  More... | |
| backward (&$i, &$current) | |
| Iterator function, starts with the previous token and continues until you reach the beginning of input tokens.  More... | |
| Protected Attributes | |
| $htmlDefinition | |
| @type HTMLPurifier_HTMLDefinition  More... | |
| $currentNesting | |
| Reference to CurrentNesting variable in Context.  More... | |
| $currentToken | |
| Reference to current token.  More... | |
| $inputZipper | |
| Reference to InputZipper variable in Context.  More... | |
| $rewindOffset = false | |
| Number of elements to rewind backwards (relative).  More... | |
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.
Definition at line 16 of file Injector.php.
| HTMLPurifier_Injector::allowsElement | ( | $name | ) | 
Tests if the context node allows a certain element.
| string | $name | Name of element to test for | 
Definition at line 147 of file Injector.php.
References $def, $i, and $name.
Referenced by HTMLPurifier_Injector_AutoParagraph\handleElement(), HTMLPurifier_Injector_AutoParagraph\handleText(), HTMLPurifier_Injector_Linkify\handleText(), and HTMLPurifier_Injector_PurifierLinkify\handleText().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | protected | 
Iterator function, starts with the previous token and continues until you reach the beginning of input tokens.
| int | $i | Current integer index variable for inputTokens | 
| HTMLPurifier_Token | $current | Current token variable. Do NOT use $token, as that variable is also a reference | 
Definition at line 234 of file Injector.php.
Referenced by HTMLPurifier_Injector_AutoParagraph\handleElement().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| HTMLPurifier_Injector::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.
| HTMLPurifier_Config | $config | 
Definition at line 120 of file Injector.php.
References $attributes, $config, $def, and $name.
Referenced by prepare().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | protected | 
Iterator function, which starts with the next token and continues until you reach the end of the input tokens.
| int | $i | Current integer index variable for inputTokens | 
| HTMLPurifier_Token | $current | Current token variable. Do NOT use $token, as that variable is also a reference | 
Definition at line 180 of file Injector.php.
Referenced by forwardUntilEndToken().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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.
| int | $i | Current integer index variable for inputTokens | 
| HTMLPurifier_Token | $current | Current token variable. Do NOT use $token, as that variable is also a reference | 
| int | $nesting | 
Definition at line 204 of file Injector.php.
References $current, $i, $result, and forward().
Referenced by HTMLPurifier_Injector_AutoParagraph\_pLookAhead(), HTMLPurifier_Injector_RemoveSpansWithoutAttributes\handleElement(), and HTMLPurifier_Injector_AutoParagraph\handleText().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| HTMLPurifier_Injector::getRewindOffset | ( | ) | 
Retrieves rewind offset, and then unsets it.
Definition at line 81 of file Injector.php.
References $r, $rewindOffset, and rewindOffset().
 Here is the call graph for this function:
 Here is the call graph for this function:| HTMLPurifier_Injector::handleElement | ( | & | $token | ) | 
Handler that is called when a start or empty token is processed.
Reimplemented in HTMLPurifier_Injector_AutoParagraph, HTMLPurifier_Injector_DisplayLinkURI, HTMLPurifier_Injector_RemoveEmpty, HTMLPurifier_Injector_RemoveSpansWithoutAttributes, and HTMLPurifier_Injector_SafeObject.
Definition at line 258 of file Injector.php.
| HTMLPurifier_Injector::handleEnd | ( | & | $token | ) | 
Handler that is called when an end token is processed.
Reimplemented in HTMLPurifier_Injector_DisplayLinkURI, HTMLPurifier_Injector_RemoveSpansWithoutAttributes, and HTMLPurifier_Injector_SafeObject.
Definition at line 265 of file Injector.php.
References notifyEnd().
 Here is the call graph for this function:
 Here is the call graph for this function:| HTMLPurifier_Injector::handleText | ( | & | $token | ) | 
Handler that is called when a text token is processed.
Reimplemented in HTMLPurifier_Injector_AutoParagraph, HTMLPurifier_Injector_Linkify, and HTMLPurifier_Injector_PurifierLinkify.
Definition at line 251 of file Injector.php.
| HTMLPurifier_Injector::notifyEnd | ( | $token | ) | 
Notifier that is called when an end token is processed.
| HTMLPurifier_Token | $token | Current token variable. | 
Definition at line 276 of file Injector.php.
Referenced by handleEnd().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| HTMLPurifier_Injector::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()).
| HTMLPurifier_Config | $config | |
| HTMLPurifier_Context | $context | 
Reimplemented in HTMLPurifier_Injector_PurifierLinkify, HTMLPurifier_Injector_RemoveEmpty, HTMLPurifier_Injector_RemoveSpansWithoutAttributes, and HTMLPurifier_Injector_SafeObject.
Definition at line 97 of file Injector.php.
References $config, $result, and checkNeeded().
 Here is the call graph for this function:
 Here is the call graph for this function:| HTMLPurifier_Injector::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.
| bool | int | $offset | 
Definition at line 72 of file Injector.php.
References rewindOffset().
Referenced by getRewindOffset(), HTMLPurifier_Injector_RemoveEmpty\handleElement(), and rewindOffset().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | protected | 
Reference to CurrentNesting variable in Context.
This is an array list of tokens that we are currently "inside" @type array
Definition at line 35 of file Injector.php.
| 
 | protected | 
| 
 | protected | 
@type HTMLPurifier_HTMLDefinition
Definition at line 28 of file Injector.php.
| 
 | protected | 
Reference to InputZipper variable in Context.
@type HTMLPurifier_Zipper
Definition at line 47 of file Injector.php.
| HTMLPurifier_Injector::$name | 
Advisory name of injector, this is for friendly error messages.
@type string
Definition at line 23 of file Injector.php.
Referenced by allowsElement(), and checkNeeded().
| HTMLPurifier_Injector::$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
Definition at line 55 of file Injector.php.
| 
 | protected | 
Number of elements to rewind backwards (relative).
@type bool|int
Definition at line 61 of file Injector.php.
Referenced by getRewindOffset().