PHP Class Horde_ActiveSync_Imap_MessageBodyData, horde

Author: Michael J Rubinsky ([email protected])
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_basePart Horde_ActiveSync_Mime
$_bodyPart array
$_html array
$_imap Horde_ActiveSync_Imap_Adapter
$_mbox Horde_Imap_Client_Mailbox
$_options array
$_plain arary
$_uid integer
$_validatedHtml boolean Flag to indicate self::$_html is validated.
$_validatedPlain boolean Flag to indicate self::$_Plain is validated.
$_version float

Méthodes publiques

Méthode Description
__construct ( array $params, array $options ) Const'r
__destruct ( )
__get ( $property )
__set ( $property, $value )
bodyPartBody ( ) : array Return the validated BODYPART data.
getBodyTypePreference ( $save_bandwidth = false ) : integer Return the BODYTYPE to return to the client. Takes BODYPREF and available parts into account.
htmlBody ( ) : array Return the validated text/html body data.
plainBody ( ) : array Return the validated text/plain body data.
toArray ( ) : array Return the body data in array format. Needed for BC.

Méthodes protégées

Méthode Description
_fetchData ( array $params ) : Horde_Imap_Client_Data_Fetch Fetch data from the IMAP client.
_getBodyPart ( Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $mime, boolean $to_html ) : array Build the data needed for the BodyPart part.
_getHtmlPart ( Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $html_mime, boolean $convert_to_plain ) : array Build the data needed for the html part.
_getParts ( ) Determine which parts we need, and fetches them from the IMAP client.
_getPlainPart ( Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $text_mime ) : array Build the data needed for the plain part.
_validateBodyData ( array &$data ) : array Validate the body data to ensure consistent EOL and UTF8 data. Returns body data in a stream object.
_wantHtml ( ) : boolean Return if we want HTML data.
_wantPlainText ( string $html_id, boolean $want_html ) : boolean Return if we want plain text data.

Method Details

__construct() public méthode

Const'r
public __construct ( array $params, array $options )
$params array Parameters: - imap: (Horde_Imap_Client_Base) The IMAP client. - mbox: (Horde_Imap_Client_Mailbox) The mailbox. - uid: (integer) The message UID. - mime: (Horde_ActiveSync_Mime) The MIME object.
$options array The options array.

__destruct() public méthode

public __destruct ( )

__get() public méthode

public __get ( $property )

__set() public méthode

public __set ( $property, $value )

_fetchData() protected méthode

Fetch data from the IMAP client.
protected _fetchData ( array $params ) : Horde_Imap_Client_Data_Fetch
$params array Parameter array. - html_id (string) The MIME id of the HTML part, if any. - text_id (string) The MIME id of the plain part, if any.
Résultat Horde_Imap_Client_Data_Fetch The results.

_getBodyPart() protected méthode

Build the data needed for the BodyPart part.
protected _getBodyPart ( Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $mime, boolean $to_html ) : array
$data Horde_Imap_Client_Data_Fetch The FETCH results.
$mime Horde_Mime_Part The plaintext MIME part.
$to_html boolean If true, $id is assumed to be a text/plain part and is converted to html.
Résultat array The BodyPart data. - charset: (string) The charset of the text. - body: (string) The body text. - truncated: (boolean) True if text was truncated. - size: (integer) The original part size, in bytes.

_getHtmlPart() protected méthode

Build the data needed for the html part.
protected _getHtmlPart ( Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $html_mime, boolean $convert_to_plain ) : array
$data Horde_Imap_Client_Data_Fetch FETCH results.
$html_mime Horde_Mime_Part The text/html MIME part.
$convert_to_plain boolean Convert text to plain text also? If true, will also return a 'plain' array.
Résultat array An array containing 'html' and if $convert_to_true is set, a 'plain' part as well. @see self::_getPlainPart for structure of each entry.

_getParts() protected méthode

Takes into account the available parts and the BODYPREF/BODYPARTPREF options.
protected _getParts ( )

_getPlainPart() protected méthode

Build the data needed for the plain part.
protected _getPlainPart ( Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $text_mime ) : array
$data Horde_Imap_Client_Data_Fetch The FETCH results.
$text_mime Horde_Mime_Part The plaintext MIME part.
Résultat array The plain part data. - charset: (string) The charset of the text. - body: (string) The body text. - truncated: (boolean) True if text was truncated. - size: (integer) The original part size, in bytes.

_validateBodyData() protected méthode

Validate the body data to ensure consistent EOL and UTF8 data. Returns body data in a stream object.
protected _validateBodyData ( array &$data ) : array
$data array The body data. @see self::_bodyPartText() for structure.
Résultat array The validated body data array. @see self::_bodyPartText()

_wantHtml() protected méthode

Return if we want HTML data.
protected _wantHtml ( ) : boolean
Résultat boolean True if HTML data is needed.

_wantPlainText() protected méthode

Return if we want plain text data.
protected _wantPlainText ( string $html_id, boolean $want_html ) : boolean
$html_id string The MIME id of any HTML part, if available. Used to detect if we need to fetch the plain part if we are requesting HTML, but only have plain.
$want_html boolean True if the client wants HTML.
Résultat boolean True if plain data is needed.

bodyPartBody() public méthode

Return the validated BODYPART data.
public bodyPartBody ( ) : array
Résultat array The validated body data array: - charset: (string) The charset of the text. - body: (Horde_Stream) The body text in a stream. - truncated: (boolean) True if text was truncated. - size: (integer) The original part size, in bytes.

getBodyTypePreference() public méthode

Return the BODYTYPE to return to the client. Takes BODYPREF and available parts into account.
public getBodyTypePreference ( $save_bandwidth = false ) : integer
Résultat integer A Horde_ActiveSync::BODYPREF_TYPE_* constant.

htmlBody() public méthode

Return the validated text/html body data.
public htmlBody ( ) : array
Résultat array The validated body data array: - charset: (string) The charset of the text. - body: (Horde_Stream) The body text in a stream. - truncated: (boolean) True if text was truncated. - size: (integer) The original part size, in bytes.

plainBody() public méthode

Return the validated text/plain body data.
public plainBody ( ) : array
Résultat array The validated body data array: - charset: (string) The charset of the text. - body: (Horde_Stream) The body text in a stream. - truncated: (boolean) True if text was truncated. - size: (integer) The original part size, in bytes.

toArray() public méthode

Return the body data in array format. Needed for BC.
public toArray ( ) : array
Résultat array

Property Details

$_basePart protected_oe property

protected Horde_ActiveSync_Mime $_basePart
Résultat Horde_ActiveSync_Mime

$_bodyPart protected_oe property

protected array $_bodyPart
Résultat array

$_html protected_oe property

protected array $_html
Résultat array

$_imap protected_oe property

protected Horde_ActiveSync_Imap_Adapter $_imap
Résultat Horde_ActiveSync_Imap_Adapter

$_mbox protected_oe property

protected Horde_Imap_Client_Mailbox $_mbox
Résultat Horde_Imap_Client_Mailbox

$_options protected_oe property

protected array $_options
Résultat array

$_plain protected_oe property

protected arary $_plain
Résultat arary

$_uid protected_oe property

protected int $_uid
Résultat integer

$_validatedHtml protected_oe property

Flag to indicate self::$_html is validated.
protected bool $_validatedHtml
Résultat boolean

$_validatedPlain protected_oe property

Flag to indicate self::$_Plain is validated.
protected bool $_validatedPlain
Résultat boolean

$_version protected_oe property

protected float $_version
Résultat float