Class Text_Flowed

Description

The Text_Flowed:: class provides common methods for manipulating text using the encoding described in RFC 3676 ('flowed' text).

$Horde: framework/Text_Flowed/Flowed.php,v 1.14.10.21 2009/01/06 15:23:43 jan Exp $

This class is based on the Text::Flowed perl module (Version 0.14) found in the CPAN perl repository. This module is released under the Perl license, which is compatible with the LGPL.

Copyright 2002-2003 Philip Mak 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_Flowed/Flowed.php (line 22)


	
			
Variable Summary
 string $_charset
 boolean $_delsp
 string $_formattype
 integer $_maxlength
 integer $_optlength
 array $_output
 string $_text
Method Summary
 Text_Flowed Text_Flowed (string $text, [string $charset = null])
 void setDelSp (boolean $delsp)
 void setMaxLength (integer $max)
 void setOptLength ( $opt, integer $max)
 string toFixed ([boolean $quote = false])
 array toFixedArray ([boolean $quote = false])
 string toFlowed ([boolean $quote = false])
Variables
string $_charset (line 67)

The character set of the text.

boolean $_delsp = false (line 74)

Convert text using DelSp?

string $_formattype = null (line 60)

The format of the data in $_output.

integer $_maxlength = 78 (line 31)

The maximum length that a line is allowed to be (unless faced with with a word that is unreasonably long). This class will re-wrap a line if it exceeds this length.

integer $_optlength = 72 (line 39)

When this class wraps a line, the newly created lines will be split at this length.

array $_output = array() (line 53)

The cached output of the formatting.

string $_text (line 46)

The text to be formatted.

Methods
Constructor Text_Flowed (line 82)

Constructor.

Text_Flowed Text_Flowed (string $text, [string $charset = null])
  • string $text: The text to process.
  • string $charset: The character set of $text.
setDelSp (line 115)

Set whether to format test using DelSp.

  • since: Horde 3.1
void setDelSp (boolean $delsp)
  • boolean $delsp: Use DelSp?
setMaxLength (line 93)

Set the maximum length of a line of text.

void setMaxLength (integer $max)
  • integer $max: A new value for $_maxlength.
setOptLength (line 103)

Set the optimal length of a line of text.

void setOptLength ( $opt, integer $max)
  • integer $max: A new value for $_optlength.
  • $opt
toFixed (line 128)

Reformats the input string, where the string is 'format=flowed' plain text as described in RFC 2646.

  • return: The text converted to RFC 2646 'fixed' format.
string toFixed ([boolean $quote = false])
  • boolean $quote: Add level of quoting to each line?
toFixedArray (line 153)

Reformats the input string, and returns the output in an array format with quote level information.

  • return: An array of arrays with the following elements:
     'level' - The quote level of the current line.
     'text'  - The text for the current line.
array toFixedArray ([boolean $quote = false])
  • boolean $quote: Add level of quoting to each line?
toFlowed (line 167)

Reformats the input string, where the string is 'format=fixed' plain text as described in RFC 2646.

  • return: The text converted to RFC 2646 'flowed' format.
string toFlowed ([boolean $quote = false])
  • boolean $quote: Add level of quoting to each line?

Documentation generated on Sun, 30 Jan 2011 05:17:22 +0000 by phpDocumentor 1.4.3