Property | 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 |
Method | 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. |
Method | 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. |
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. |
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. |
return | Horde_Imap_Client_Data_Fetch | The results. |
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. |
return | 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. |
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. |
return | 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. |
protected _getParts ( ) |
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. |
return | 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. |
protected _validateBodyData ( array &$data ) : array | ||
$data | array | The body data. @see self::_bodyPartText() for structure. |
return | array | The validated body data array. @see self::_bodyPartText() |
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. |
return | boolean | True if plain data is needed. |
public bodyPartBody ( ) : array | ||
return | 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. |
public getBodyTypePreference ( $save_bandwidth = false ) : integer | ||
return | integer | A Horde_ActiveSync::BODYPREF_TYPE_* constant. |
protected Horde_ActiveSync_Mime $_basePart | ||
return | Horde_ActiveSync_Mime |
protected Horde_ActiveSync_Imap_Adapter $_imap | ||
return | Horde_ActiveSync_Imap_Adapter |
protected Horde_Imap_Client_Mailbox $_mbox | ||
return | Horde_Imap_Client_Mailbox |
protected bool $_validatedHtml | ||
return | boolean |
protected bool $_validatedPlain | ||
return | boolean |