PHP 클래스 Horde_ActiveSync_Imap_Message, horde

Some Mime parsing code taken from Imp_Contents.
저자: Michael J Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_basePart Horde_ActiveSync_Mime Message structure.
$_data Horde_Imap_Client_Data_Fetch Message data.
$_hasAttachments boolean Flag to indicate if this message contains attachments.
$_imap Horde_Imap_Client_Base The imap client.
$_lastBodyPartDecode boolean Cache if the last body part was encoded or not.

공개 메소드들

메소드 설명
__construct ( Horde_Imap_Client_Base $imap, Horde_Imap_Client_Mailbox $mbox, Horde_Imap_Client_Data_Fetch $data ) Constructor
__destruct ( )
__get ( string $property ) : mixed Accessor
contentTypeMap ( ) : array Return this message's content map
getAttachments ( float $version ) : array Return an array of Horde_ActiveSync_Message_Attachment objects for the current message.
getAttachmentsMimeParts ( ) : array Return an array of mime parts for each message attachment.
getBodyPart ( integer $id, array $options ) : mixed Gets the raw text for one section of the message.
getCc ( ) : string Return the CC addresses for this message.
getDate ( ) : Horde_Date Return the message date.
getFlag ( string $flag ) : boolean Get a message flag
getFlags ( ) : array Return all message flags.
getForwardHeaders ( ) : string Return nicely formatted text representing the headers to display with in-line forwarded messages.
getFromAddress ( ) : string Return the message's From: address.
getFullMsg ( boolean $stream = false ) : mixed Return the full message text.
getHeaders ( ) : Horde_Mime_Headers Return this message's base part headers.
getMessageBodyData ( array $options = [] ) : array Returns the main text body of the message suitable for sending over EAS response.
getMessageBodyDataObject ( array $options = [] ) : Horde_ActiveSync_Imap_MessageBodyData Returns the main text body of the message suitable for sending over EAS response.
getMimePart ( integer $id, array $options = [] ) : Horde_Mime_Part Fetch a part of a MIME message.
getPartName ( Horde_Mime_Part $part, boolean $use_descrip = false ) : string Return the descriptive part label, making sure it is not empty.
getReplyTo ( ) : string Return the ReplyTo Address
getStructure ( ) : Horde_Mime_Part Return the message's base Mime part.
getSubject ( ) : string Return the message subject.
getToAddresses ( ) : array Return the To addresses from this message.
hasAttachments ( ) : boolean Return the hasAttachments flag
hasiCalendar ( ) : mixed Return the MIME part of the iCalendar attachment, if available.
isAttachment ( string $id, string $mime_type ) : boolean Determines if a MIME type is an attachment.
isEncrypted ( Horde_Mime_Part $message = null ) : boolean Return the S/MIME encryption status of this message (RFC2633)
isSigned ( Horde_Mime_Part $message = null ) : boolean Return the S/MIME signature status of this message (RFC2633)

보호된 메소드들

메소드 설명
_buildEasAttachmentFromMime ( integer $id, Horde_Mime_Part $mime_part, float $version ) : Horde_ActiveSync_Message_AirSyncBaseAttachment Build an appropriate attachment object from the given mime part.
_decodeTnefData ( integer | Horde_Mime_part $data ) : Horde_Mime_Part Convert a TNEF attachment into a multipart/mixed part.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Horde_Imap_Client_Base $imap, Horde_Imap_Client_Mailbox $mbox, Horde_Imap_Client_Data_Fetch $data )
$imap Horde_Imap_Client_Base The imap client object.
$mbox Horde_Imap_Client_Mailbox The mailbox object.
$data Horde_Imap_Client_Data_Fetch The data returned from a FETCH must contain at least uid, structure and flags.

__destruct() 공개 메소드

public __destruct ( )

__get() 공개 메소드

Accessor
public __get ( string $property ) : mixed
$property string The property.
리턴 mixed

_buildEasAttachmentFromMime() 보호된 메소드

Build an appropriate attachment object from the given mime part.
protected _buildEasAttachmentFromMime ( integer $id, Horde_Mime_Part $mime_part, float $version ) : Horde_ActiveSync_Message_AirSyncBaseAttachment
$id integer The mime id for the part
$mime_part Horde_Mime_Part The mime part.
$version float The EAS version.
리턴 Horde_ActiveSync_Message_AirSyncBaseAttachment | Horde_ActiveSync_Message_Attachment

_decodeTnefData() 보호된 메소드

Convert a TNEF attachment into a multipart/mixed part.
protected _decodeTnefData ( integer | Horde_Mime_part $data ) : Horde_Mime_Part
$data integer | Horde_Mime_part Either a mime part id or a Horde_Mime_Part object containing the TNEF attachment.
리턴 Horde_Mime_Part The multipart/mixed MIME part containing any attachment data we can decode.

contentTypeMap() 공개 메소드

Return this message's content map
public contentTypeMap ( ) : array
리턴 array The content map, with mime ids as keys and content type as values.

getAttachments() 공개 메소드

Return an array of Horde_ActiveSync_Message_Attachment objects for the current message.
public getAttachments ( float $version ) : array
$version float The EAS protocol version this is for.
리턴 array An array of Horde_ActiveSync_Message_Attachment objects.

getAttachmentsMimeParts() 공개 메소드

Return an array of mime parts for each message attachment.
public getAttachmentsMimeParts ( ) : array
리턴 array An array of Horde_Mime_Part objects.

getBodyPart() 공개 메소드

Gets the raw text for one section of the message.
public getBodyPart ( integer $id, array $options ) : mixed
$id integer The ID of the MIME part.
$options array Additional options: - decode: (boolean) Attempt to decode the bodypart on the remote server. If successful, sets self::$_lastBodyPartDecode to the content-type of the decoded data. DEFAULT: No - length: (integer) If set, only download this many bytes of the bodypart from the server. DEFAULT: All data is retrieved. - mimeheaders: (boolean) Include the MIME headers also? DEFAULT: No - stream: (boolean) If true, return a stream. DEFAULT: No
리턴 mixed The text of the part or a stream resource if 'stream' is true.

getCc() 공개 메소드

Return the CC addresses for this message.
public getCc ( ) : string
리턴 string The Cc address string.

getDate() 공개 메소드

Return the message date.
public getDate ( ) : Horde_Date
리턴 Horde_Date The messages's envelope date.

getFlag() 공개 메소드

Get a message flag
public getFlag ( string $flag ) : boolean
$flag string The flag to search for.
리턴 boolean

getFlags() 공개 메소드

Return all message flags.
부터: 2.17.0
public getFlags ( ) : array
리턴 array An array of message flags.

getForwardHeaders() 공개 메소드

Return nicely formatted text representing the headers to display with in-line forwarded messages.
public getForwardHeaders ( ) : string
리턴 string

getFromAddress() 공개 메소드

Return the message's From: address.
public getFromAddress ( ) : string
리턴 string The From address of this message.

getFullMsg() 공개 메소드

Return the full message text.
public getFullMsg ( boolean $stream = false ) : mixed
$stream boolean Return data as a stream?
리턴 mixed A string or stream resource.

getHeaders() 공개 메소드

Return this message's base part headers.
public getHeaders ( ) : Horde_Mime_Headers
리턴 Horde_Mime_Headers The message headers.

getMessageBodyData() 공개 메소드

Returns the main text body of the message suitable for sending over EAS response.
public getMessageBodyData ( array $options = [] ) : array
$options array An options array containgin: - bodyprefs: (array) Bodypref settings DEFAULT: none (No bodyprefs used). - mimesupport: (integer) Indicates if MIME is supported or not. Possible values: 0 - Not supported 1 - Only S/MIME or 2 - All MIME. DEFAULT: 0 (No MIME support) - protocolversion: (float) The EAS protocol we are supporting. DEFAULT 2.5
리턴 array An array of one or both of 'plain' and 'html' content.

getMessageBodyDataObject() 공개 메소드

Returns the main text body of the message suitable for sending over EAS response.
public getMessageBodyDataObject ( array $options = [] ) : Horde_ActiveSync_Imap_MessageBodyData
$options array An options array containgin: - bodyprefs: (array) Bodypref settings DEFAULT: none (No bodyprefs used). - mimesupport: (integer) Indicates if MIME is supported or not. Possible values: 0 - Not supported 1 - Only S/MIME or 2 - All MIME. DEFAULT: 0 (No MIME support) - protocolversion: (float) The EAS protocol we are supporting. DEFAULT 2.5
리턴 Horde_ActiveSync_Imap_MessageBodyData The result.

getMimePart() 공개 메소드

Fetch a part of a MIME message.
public getMimePart ( integer $id, array $options = [] ) : Horde_Mime_Part
$id integer The MIME index of the part requested.
$options array Additional options: - length: (integer) If set, only download this many bytes of the bodypart from the server. DEFAULT: All data is retrieved. - nocontents: (boolean) If true, don't add the contents to the part DEFAULT: Contents are added to the part
리턴 Horde_Mime_Part The raw MIME part asked for.

getPartName() 공개 메소드

Return the descriptive part label, making sure it is not empty.
public getPartName ( Horde_Mime_Part $part, boolean $use_descrip = false ) : string
$part Horde_Mime_Part The MIME Part object.
$use_descrip boolean Use description? If false, uses name.
리턴 string The part label (non-empty).

getReplyTo() 공개 메소드

Return the ReplyTo Address
public getReplyTo ( ) : string
리턴 string

getStructure() 공개 메소드

Return the message's base Mime part.
public getStructure ( ) : Horde_Mime_Part
리턴 Horde_Mime_Part

getSubject() 공개 메소드

Return the message subject.
public getSubject ( ) : string
리턴 string The subject.

getToAddresses() 공개 메소드

Return the To addresses from this message.
public getToAddresses ( ) : array
리턴 array An array containing arrays of 'to' and 'displayto' addresses. @since 2.37.1, ensures the text is UTF8.

hasAttachments() 공개 메소드

Return the hasAttachments flag
public hasAttachments ( ) : boolean
리턴 boolean

hasiCalendar() 공개 메소드

Return the MIME part of the iCalendar attachment, if available.
public hasiCalendar ( ) : mixed
리턴 mixed The mime part, if present, false otherwise.

isAttachment() 공개 메소드

For our purposes, an attachment is any MIME part that can be downloaded by itself (i.e. all the data needed to view the part is contained within the download data).
사용 중단: Will be removed in 3.0 (Only used in self::hasAttachments call).
public isAttachment ( string $id, string $mime_type ) : boolean
$id string The MIME Id for the part we are checking.
$mime_type string The MIME type.
리턴 boolean True if an attachment.

isEncrypted() 공개 메소드

Return the S/MIME encryption status of this message (RFC2633)
public isEncrypted ( Horde_Mime_Part $message = null ) : boolean
$message Horde_Mime_Part A mime part to check. If omitted, use self::$_message.
리턴 boolean True if message is S/MIME signed or encrypted, false otherwise.

isSigned() 공개 메소드

Return the S/MIME signature status of this message (RFC2633)
public isSigned ( Horde_Mime_Part $message = null ) : boolean
$message Horde_Mime_Part A mime part to check. If omitted, use self::$_message.
리턴 boolean True if message is S/MIME signed, false otherwise.

프로퍼티 상세

$_basePart 보호되어 있는 프로퍼티

Message structure.
protected Horde_ActiveSync_Mime $_basePart
리턴 Horde_ActiveSync_Mime

$_data 보호되어 있는 프로퍼티

Message data.
protected Horde_Imap_Client_Data_Fetch $_data
리턴 Horde_Imap_Client_Data_Fetch

$_hasAttachments 보호되어 있는 프로퍼티

Flag to indicate if this message contains attachments.
protected bool $_hasAttachments
리턴 boolean

$_imap 보호되어 있는 프로퍼티

The imap client.
protected Horde_Imap_Client_Base $_imap
리턴 Horde_Imap_Client_Base

$_lastBodyPartDecode 보호되어 있는 프로퍼티

Cache if the last body part was encoded or not.
protected bool $_lastBodyPartDecode
리턴 boolean