PHP Class Horde_Compress_Tnef_Rtf, horde

Author: Michael J Rubinsky ([email protected])
Inheritance: extends Horde_Compress_Tnef_Object
Mostra file Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$type string MIME type.

Protected Properties

Property Type Description
$_content string RTF content.
$_size integer Size of RTF content.

Public Methods

Method Description
__construct ( $logger, $data )
__get ( $property )
toArray ( ) : array Output the data for this object in an array.
toPlain ( ) : string Obtain a good-enough-for-our-needs plain text representation of the RTF document.

Protected Methods

Method Description
_decode ( )
_decompress ( ) : string Decompress compressed RTF. Logic taken and adapted from NasMail RTF plugin.
_rtf2text ( string $text ) : string Parse RTF data and return the best plaintext representation we can.
_rtfIsPlain ( $s )

Method Details

__construct() public method

public __construct ( $logger, $data )

__get() public method

public __get ( $property )

_decode() protected method

protected _decode ( )

_decompress() protected method

Decompress compressed RTF. Logic taken and adapted from NasMail RTF plugin.
protected _decompress ( ) : string
return string

_rtf2text() protected method

Adapted from: http://webcheatsheet.com/php/reading_the_clean_text_from_rtf.php
protected _rtf2text ( string $text ) : string
$text string The RTF text.
return string The plaintext.

_rtfIsPlain() protected method

protected _rtfIsPlain ( $s )

toArray() public method

Output the data for this object in an array.
public toArray ( ) : array
return array - type: (string) The MIME type of the content. - subtype: (string) The MIME subtype. - name: (string) The filename. - stream: (string) The file data.

toPlain() public method

Obtain a good-enough-for-our-needs plain text representation of the RTF document.
public toPlain ( ) : string
return string The plaintext.

Property Details

$_content protected_oe property

RTF content.
protected string $_content
return string

$_size protected_oe property

Size of RTF content.
protected int $_size
return integer

$type public_oe property

MIME type.
public string $type
return string