PHP Класс Horde_ActiveSync_Imap_MessageBodyData, horde

Автор: Michael J Rubinsky ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

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 __destruct ( )

__get() публичный Метод

public __get ( $property )

__set() публичный Метод

public __set ( $property, $value )

_fetchData() защищенный Метод

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.
Результат Horde_Imap_Client_Data_Fetch The results.

_getBodyPart() защищенный Метод

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.
Результат 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() защищенный Метод

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.
Результат 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() защищенный Метод

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

_getPlainPart() защищенный Метод

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.
Результат 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() защищенный Метод

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.
Результат array The validated body data array. @see self::_bodyPartText()

_wantHtml() защищенный Метод

Return if we want HTML data.
protected _wantHtml ( ) : boolean
Результат boolean True if HTML data is needed.

_wantPlainText() защищенный Метод

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.
Результат boolean True if plain data is needed.

bodyPartBody() публичный Метод

Return the validated BODYPART data.
public bodyPartBody ( ) : array
Результат 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() публичный Метод

Return the BODYTYPE to return to the client. Takes BODYPREF and available parts into account.
public getBodyTypePreference ( $save_bandwidth = false ) : integer
Результат integer A Horde_ActiveSync::BODYPREF_TYPE_* constant.

htmlBody() публичный Метод

Return the validated text/html body data.
public htmlBody ( ) : array
Результат 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() публичный Метод

Return the validated text/plain body data.
public plainBody ( ) : array
Результат 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() публичный Метод

Return the body data in array format. Needed for BC.
public toArray ( ) : array
Результат array

Описание свойств

$_basePart защищенное свойство

protected Horde_ActiveSync_Mime $_basePart
Результат Horde_ActiveSync_Mime

$_bodyPart защищенное свойство

protected array $_bodyPart
Результат array

$_html защищенное свойство

protected array $_html
Результат array

$_imap защищенное свойство

protected Horde_ActiveSync_Imap_Adapter $_imap
Результат Horde_ActiveSync_Imap_Adapter

$_mbox защищенное свойство

protected Horde_Imap_Client_Mailbox $_mbox
Результат Horde_Imap_Client_Mailbox

$_options защищенное свойство

protected array $_options
Результат array

$_plain защищенное свойство

protected arary $_plain
Результат arary

$_uid защищенное свойство

protected int $_uid
Результат integer

$_validatedHtml защищенное свойство

Flag to indicate self::$_html is validated.
protected bool $_validatedHtml
Результат boolean

$_validatedPlain защищенное свойство

Flag to indicate self::$_Plain is validated.
protected bool $_validatedPlain
Результат boolean

$_version защищенное свойство

protected float $_version
Результат float