XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
HTMLPurifier_Injector_AutoParagraph Class Reference
Inheritance diagram for HTMLPurifier_Injector_AutoParagraph:
Inheritance graph

Public Member Functions

 handleElement (&$token)
 
 handleText (&$token)
 
- Public Member Functions inherited from HTMLPurifier_Injector
 allowsElement ($name)
 
 checkNeeded ($config)
 
 getRewind ()
 
 handleElement (&$token)
 
 handleEnd (&$token)
 
 handleText (&$token)
 
 notifyEnd ($token)
 
 prepare ($config, $context)
 
 rewind ($index)
 

Public Attributes

 $name = 'AutoParagraph'
 
 $needed = array('p')
 
- Public Attributes inherited from HTMLPurifier_Injector
 $name
 
 $needed = array()
 

Private Member Functions

 _checkNeedsP ($current)
 
 _isInline ($token)
 
 _pLookAhead ()
 
 _pStart ()
 
 _splitText ($data, &$result)
 

Additional Inherited Members

- Protected Member Functions inherited from HTMLPurifier_Injector
 backward (&$i, &$current)
 
 current (&$i, &$current)
 
 forward (&$i, &$current)
 
 forwardUntilEndToken (&$i, &$current, &$nesting)
 
- Protected Attributes inherited from HTMLPurifier_Injector
 $currentNesting
 
 $htmlDefinition
 
 $inputIndex
 
 $inputTokens
 
 $rewind = false
 

Detailed Description

Injector that auto paragraphs text in the root node based on double-spacing.

Todo:

Ensure all states are unit tested, including variations as well.

Make a graph of the flow control for this Injector.

Definition at line 9 of file AutoParagraph.php.

Member Function Documentation

HTMLPurifier_Injector_AutoParagraph::_checkNeedsP (   $current)
private

Determines if a particular token requires an earlier inline token to get a paragraph. This should be used with _forwardUntilEndToken

Definition at line 322 of file AutoParagraph.php.

References _isInline().

Referenced by _pLookAhead().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_Injector_AutoParagraph::_isInline (   $token)
private

Returns true if passed token is inline (and, ergo, allowed in paragraph tags)

Definition at line 295 of file AutoParagraph.php.

References $token.

Referenced by _checkNeedsP(), and handleElement().

Here is the caller graph for this function:

HTMLPurifier_Injector_AutoParagraph::_pLookAhead ( )
private

Looks ahead in the token list and determines whether or not we need to insert a

tag.

Definition at line 303 of file AutoParagraph.php.

References $i, $result, _checkNeedsP(), HTMLPurifier_Injector\current(), and HTMLPurifier_Injector\forwardUntilEndToken().

Referenced by handleElement(), and handleText().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_Injector_AutoParagraph::_pStart ( )
private

Definition at line 15 of file AutoParagraph.php.

Referenced by _splitText(), handleElement(), and handleText().

Here is the caller graph for this function:

HTMLPurifier_Injector_AutoParagraph::_splitText (   $data,
$result 
)
private

Splits up a text in paragraph tokens and appends them to the result stream that will replace the original

Parameters
$dataString text data that will be processed into paragraphs
$resultReference to array of tokens that the tags will be appended onto
$configInstance of HTMLPurifier_Config
$contextInstance of HTMLPurifier_Context

Definition at line 211 of file AutoParagraph.php.

References $i, $result, and _pStart().

Referenced by handleText().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_Injector_AutoParagraph::handleElement ( $token)

Definition at line 97 of file AutoParagraph.php.

References $i, $token, _isInline(), _pLookAhead(), _pStart(), HTMLPurifier_Injector\allowsElement(), and HTMLPurifier_Injector\backward().

Here is the call graph for this function:

HTMLPurifier_Injector_AutoParagraph::handleText ( $token)

Definition at line 21 of file AutoParagraph.php.

References $i, $token, _pLookAhead(), _pStart(), _splitText(), HTMLPurifier_Injector\allowsElement(), and HTMLPurifier_Injector\forwardUntilEndToken().

Here is the call graph for this function:

Member Data Documentation

HTMLPurifier_Injector_AutoParagraph::$name = 'AutoParagraph'

Definition at line 12 of file AutoParagraph.php.

HTMLPurifier_Injector_AutoParagraph::$needed = array('p')

Definition at line 13 of file AutoParagraph.php.


The documentation for this class was generated from the following file: