[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/libraries/htmlpurifier/library/HTMLPurifier/ -> Injector.php (summary)

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.

File Size: 233 lines (8 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 13 functions

  rewind()
  getRewind()
  prepare()
  checkNeeded()
  allowsElement()
  forward()
  forwardUntilEndToken()
  backward()
  current()
  handleText()
  handleElement()
  handleEnd()
  notifyEnd()

Functions
Functions that are not part of a class:

rewind($index)   X-Ref
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.


getRewind()   X-Ref
Retrieves rewind, and then unsets it.


prepare($config, $context)   X-Ref
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: $config Instance of HTMLPurifier_Config
param: $context Instance of HTMLPurifier_Context
return: Boolean false if success, string of missing needed element/attribute if failure

checkNeeded($config)   X-Ref
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: $config Instance of HTMLPurifier_Config
param: $context Instance of HTMLPurifier_Context
return: Boolean false if success, string of missing needed element/attribute if failure

allowsElement($name)   X-Ref
Tests if the context node allows a certain element

param: $name Name of element to test for
return: True if element is allowed, false if it is not

forward(&$i, &$current)   X-Ref
Iterator function, which starts with the next token and continues until
you reach the end of the input tokens.

param: &$i Current integer index variable for inputTokens
param: &$current Current token variable. Do NOT use $token, as that variable is also a reference

forwardUntilEndToken(&$i, &$current, &$nesting)   X-Ref
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.


backward(&$i, &$current)   X-Ref
Iterator function, starts with the previous token and continues until
you reach the beginning of input tokens.

param: &$i Current integer index variable for inputTokens
param: &$current Current token variable. Do NOT use $token, as that variable is also a reference

current(&$i, &$current)   X-Ref
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.

param: &$i Current integer index variable for inputTokens
param: &$current Current token variable. Do NOT use $token, as that variable is also a reference

handleText(&$token)   X-Ref
Handler that is called when a text token is processed


handleElement(&$token)   X-Ref
Handler that is called when a start or empty token is processed


handleEnd(&$token)   X-Ref
Handler that is called when an end token is processed


notifyEnd($token)   X-Ref
Notifier that is called when an end token is processed




Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1