Class Text_Filter_html2text

Description

Takes HTML and converts it to formatted, plain text.

Parameters:

 charset -- The charset to use for html_entity_decode() calls.
 width   -- The wrapping width.
 wrap    -- Whether to wrap the text or not.

$Horde: framework/Text_Filter/Filter/html2text.php,v 1.4.10.26 2010-10-15 15:14:47 jan Exp $

Copyright 2003-2004 Jon Abernathy <jon@chuggnutt.com> Original source: http://www.chuggnutt.com/html2text.php Copyright 2004-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Text_Filter/Filter/html2text.php (line 29)

Text_Filter
   |
   --Text_Filter_html2text
Variable Summary
 array $_params
Method Summary
 array getPatterns ()
 string postProcess (string $text)
 string preProcess (string $text)
 string _blockQuote (string $text)
 string _int2utf8 (integer $num)
 string _quote (string $text)
Variables
array $_params = array('charset' => null,
'width' => 70,
'wrap' => true)
(line 36)

Filter parameters.


Redefinition of:
Text_Filter::$_params
Filter parameters.
Methods
getPatterns (line 66)

Returns a hash with replace patterns.

  • return: Patterns hash.
array getPatterns ()

Redefinition of:
Text_Filter::getPatterns()
Returns a hash with replace patterns.
postProcess (line 161)

Executes any code necessaray after applying the filter patterns.

  • return: The modified text.
string postProcess (string $text)
  • string $text: The text after the filtering.

Redefinition of:
Text_Filter::postProcess()
Executes any code necessaray after applying the filter patterns.
preProcess (line 47)

Executes any code necessaray before applying the filter patterns.

  • return: The modified text.
string preProcess (string $text)
  • string $text: The text before the filtering.

Redefinition of:
Text_Filter::preProcess()
Executes any code necessaray before applying the filter patterns.
_blockQuote (line 208)

Replaces blockquote tags with > quotes.

  • return: The quoted text.
string _blockQuote (string $text)
  • string $text: The text to quote.
_int2utf8 (line 247)

Returns the UTF-8 character sequence of a Unicode value.

  • return: The UTF-8 string.
string _int2utf8 (integer $num)
  • integer $num: A Unicode value.
_quote (line 223)

Quotes a chunk of text.

  • return: The quoted text.
string _quote (string $text)
  • string $text: The text to quote.

Inherited Methods

Inherited From Text_Filter

 Text_Filter::Text_Filter()
 Text_Filter::factory()
 Text_Filter::filter()
 Text_Filter::getPatterns()
 Text_Filter::postProcess()
 Text_Filter::preProcess()

Documentation generated on Sun, 30 Jan 2011 05:18:14 +0000 by phpDocumentor 1.4.3