PHP Class Horde_Text_Filter_Html2text, horde

Optional parameters to constructor:
callback     - (callback) Callback triggered on every node. Passed the
               DOMDocument object and the DOMNode object. If the callback
               returns non-null, add this text to the output and skip further
               processing of the node.
width        - (integer) The wrapping width. Set to 0 to not wrap.
nestingLimit - (integer) The limit on node nesting. If empty, no limit.
Since: 2.3.0
Author: Jan Schneider ([email protected])
Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Text_Filter_Base
Datei anzeigen Open project: horde/horde

Protected Properties

Property Type Description
$_indent integer Current list indentation level.
$_linkList array The list of links contained in the message.
$_nestingLevel integer Current nesting level.
$_params array Filter parameters.

Public Methods

Method Description
getPatterns ( ) : array Returns a hash with replace patterns.
postProcess ( string $text ) : string Executes any code necessary after applying the filter patterns.
preProcess ( string $text ) : string Executes any code necessary before applying the filter patterns.

Protected Methods

Method Description
_buildLinkList ( DOMDocument $doc, DOMElement $node ) Maintains an internal list of links to be displayed at the end of the text, with numeric indices to the original point in the text they appeared.
_node ( DOMDocument $doc, DOMElement $node ) : string Process DOM node.

Method Details

_node() protected method

Process DOM node.
protected _node ( DOMDocument $doc, DOMElement $node ) : string
$doc DOMDocument Document node.
$node DOMElement Element node.
return string The plaintext representation.

getPatterns() public method

Returns a hash with replace patterns.
public getPatterns ( ) : array
return array Patterns hash.

postProcess() public method

Executes any code necessary after applying the filter patterns.
public postProcess ( string $text ) : string
$text string The text after the filtering.
return string The modified text.

preProcess() public method

Executes any code necessary before applying the filter patterns.
public preProcess ( string $text ) : string
$text string The text before the filtering.
return string The modified text.

Property Details

$_indent protected_oe property

Current list indentation level.
protected int $_indent
return integer

$_nestingLevel protected_oe property

Current nesting level.
protected int $_nestingLevel
return integer

$_params protected_oe property

Filter parameters.
protected array $_params
return array