PHP 클래스 Horde_ActiveSync_Imap_Adapter, horde

저자: Michael J Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_defaultNamespace string
$_imap Horde_ActiveSync_Interface_ImapFactory
$_logger Horde_Log_Logger
$_procid integer Process id used for logging.

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Cont'r
appendMessage ( string $folderid, string | stream $msg, array $flags = [] ) : integer | boolean Append a message to the specified mailbox. Used for saving sent email.
categoriesToFlags ( $mailbox, $categories, $uid )
createMailbox ( string $name, string $parent = null ) : string Create a new mailbox on the server, and subscribe to it.
deleteMailbox ( string $name ) Delete a mailbox
deleteMessages ( array $uids, string $folderid ) : array Permanently delete a mail message.
emptyMailbox ( string $mbox ) Completely empty specified mailbox.
getAttachment ( string $mailbox, string $uid, string $part ) : Horde_Mime_Part Return the content of a specific MIME part of the specified message.
getImapMessage ( string $mailbox, array | integer $uid, array $options = [] ) : array Return a complete Horde_ActiveSync_Imap_Message object for the requested uid.
getMailboxes ( ) : array Return an array of available mailboxes. Uses's the mail/mailboxList API method for obtaining the list.
getMessageChanges ( Horde_ActiveSync_Folder_Imap $folder, array $options = [] ) : Horde_ActiveSync_Folder_Imap Return message changes from the specified mailbox.
getMessages ( string $folderid, array $messages, array $options = [] ) : array Return AS mail messages, from the given IMAP UIDs.
getSpecialMailboxes ( ) : array Return the list of special mailboxes.
getUidFromMid ( string $mid, Horde_ActiveSync_Folder_Imap $folder ) : integer Return an array of message UIDs from a list of Message-IDs.
getUidFromMidInFolders ( $id, array $folders ) : array Attempt to find a Message-ID in a list of mail folders.
moveMessage ( string $folderid, array $ids, string $newfolderid ) : array Move a mail message
ping ( Horde_ActiveSync_Folder_Imap $folder ) : boolean Ping a mailbox. This detects only if any new messages have arrived in the specified mailbox.
queryMailbox ( array $query ) : array Perform a search from a search mailbox request.
renameMailbox ( string $old, string $new, string $parent = null ) : string Rename a mailbox
setImapFlag ( string $mailbox, integer $uid, string $flag ) Set a IMAP message flag.
setLogger ( Horde_Log_Logger $logger ) Set this instance's logger.
setMessageFlag ( string $mailbox, integer $uid, Horde_ActiveSync_Message_Flag $flag ) Set a POOMMAIL_FLAG on a mail message. This method differs from setReadFlag() in that it is passed a Flag object, which contains other data beside the seen status. Used for setting flagged for followup and potentially creating tasks based on the email.
setReadFlag ( string $mailbox, string $uid, integer $flag ) Set the message's read status.

보호된 메소드들

메소드 설명
_buildBodyPart ( Horde_ActiveSync_Imap_MessageBodyData $mbd, array $options, Horde_ActiveSync_Message_AirSyncBaseBodypart $message )
_buildHtmlPart ( Horde_ActiveSync_Imap_MessageBodyData $mbd, Horde_ActiveSync_Message_AirSyncBaseBody $message ) Build the HTML body and populate the appropriate message object.
_buildMailMessage ( Horde_Imap_Client_Mailbox $mbox, Horde_Imap_Client_Data_Fetch $data, array $options = [] ) : Horde_ActiveSync_Message_Mail Builds a proper AS mail message object.
_buildSubQuery ( array $query ) : Horde_Imap_Client_Search_Query Helper to build a subquery
_defaultNamespace ( ) : array Return the default namespace.
_doQuery ( array $query ) : array Perform an IMAP search based on a SEARCH request.
_getEASImportance ( string $importance ) : integer Map Importance header values to EAS importance values.
_getImapOb ( ) : Horde_Imap_Client_Base Helper to obtain a valid IMAP client. Can't inject it since the user is not yet authenticated at the time of object creation.
_getMailMessages ( Horde_Imap_Client_Mailbox $mbox, array $uids, array $options = [] ) : Horde_Imap_Fetch_Results
_getMsgFlags ( )
_getNamespace ( $path )
_getNamespacelist ( ) : array Return the list of configured namespaces on the IMAP server.
_getiTipStatus ( Horde_Icalendar $vCal ) Return the attendee participation status.
_mailboxExists ( string $mbox ) : boolean Check existence of a mailbox.
_prependNamespace ( string $name ) : string Prefix the default namespace to mailbox name if needed.

메소드 상세

__construct() 공개 메소드

Cont'r
public __construct ( array $params = [] )
$params array Parameters: - factory: (Horde_ActiveSync_Interface_ImapFactory) Factory object DEFAULT: none - REQUIRED

_buildBodyPart() 보호된 메소드

protected _buildBodyPart ( Horde_ActiveSync_Imap_MessageBodyData $mbd, array $options, Horde_ActiveSync_Message_AirSyncBaseBodypart $message )
$mbd Horde_ActiveSync_Imap_MessageBodyData
$options array
$message Horde_ActiveSync_Message_AirSyncBaseBodypart

_buildHtmlPart() 보호된 메소드

Build the HTML body and populate the appropriate message object.
protected _buildHtmlPart ( Horde_ActiveSync_Imap_MessageBodyData $mbd, Horde_ActiveSync_Message_AirSyncBaseBody $message )
$mbd Horde_ActiveSync_Imap_MessageBodyData The body data array.
$message Horde_ActiveSync_Message_AirSyncBaseBody The body or bodypart object.

_buildMailMessage() 보호된 메소드

Builds a proper AS mail message object.
protected _buildMailMessage ( Horde_Imap_Client_Mailbox $mbox, Horde_Imap_Client_Data_Fetch $data, array $options = [] ) : Horde_ActiveSync_Message_Mail
$mbox Horde_Imap_Client_Mailbox The IMAP mailbox.
$data Horde_Imap_Client_Data_Fetch The fetch results.
$options array Additional Options: - truncation: (integer) Truncate the message body to this length. DEFAULT: No truncation. - bodyprefs: (array) Bodyprefs, if sent from device. DEFAULT: none (No body prefs sent or enforced). - bodypartprefs: (array) Bodypartprefs, if sent from device. DEFAULT: none (No body part prefs sent or enforced). - 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 version to support. DEFAULT: 2.5
리턴 Horde_ActiveSync_Message_Mail The message object suitable for streaming to the device.

_buildSubQuery() 보호된 메소드

Helper to build a subquery
protected _buildSubQuery ( array $query ) : Horde_Imap_Client_Search_Query
$query array A subquery array.
리턴 Horde_Imap_Client_Search_Query The query object.

_defaultNamespace() 보호된 메소드

Return the default namespace.
protected _defaultNamespace ( ) : array
리턴 array The namespace data.

_doQuery() 보호된 메소드

Perform an IMAP search based on a SEARCH request.
protected _doQuery ( array $query ) : array
$query array The search query.
리턴 array The results array containing an array of hashes: 'uniqueid' => [The unique identifier of the result] 'searchfolderid' => [The mailbox name that this result comes from]

_getEASImportance() 보호된 메소드

Map Importance header values to EAS importance values.
protected _getEASImportance ( string $importance ) : integer
$importance string The importance [high|normal|low].
리턴 integer The EAS importance value [0|1|2].

_getImapOb() 보호된 메소드

Helper to obtain a valid IMAP client. Can't inject it since the user is not yet authenticated at the time of object creation.
protected _getImapOb ( ) : Horde_Imap_Client_Base
리턴 Horde_Imap_Client_Base

_getMailMessages() 보호된 메소드

protected _getMailMessages ( Horde_Imap_Client_Mailbox $mbox, array $uids, array $options = [] ) : Horde_Imap_Fetch_Results
$mbox Horde_Imap_Client_Mailbox The mailbox
$uids array An array of message uids
$options array An options array - headers: (boolean) Fetch header text if true. DEFAULT: false (Do not fetch header text). - structure: (boolean) Fetch message structure. DEFAULT: true (Fetch message structure). - flags: (boolean) Fetch messagge flags. DEFAULT: true (Fetch message flags). - envelope: (boolen) Fetch the envelope data. DEFAULT: false (Do not fetch envelope). @since 2.4.0
리턴 Horde_Imap_Fetch_Results The results.

_getMsgFlags() 보호된 메소드

protected _getMsgFlags ( )

_getNamespace() 보호된 메소드

protected _getNamespace ( $path )

_getNamespacelist() 보호된 메소드

Return the list of configured namespaces on the IMAP server.
protected _getNamespacelist ( ) : array
리턴 array

_getiTipStatus() 보호된 메소드

Return the attendee participation status.
protected _getiTipStatus ( Horde_Icalendar $vCal )
$vCal Horde_Icalendar The vCalendar component.

_mailboxExists() 보호된 메소드

Check existence of a mailbox.
protected _mailboxExists ( string $mbox ) : boolean
$mbox string The mailbox name.
리턴 boolean

_prependNamespace() 보호된 메소드

Prefix the default namespace to mailbox name if needed.
protected _prependNamespace ( string $name ) : string
$name string The mailbox name.
리턴 string The mailbox name with the default namespace added, if needed.

appendMessage() 공개 메소드

Append a message to the specified mailbox. Used for saving sent email.
public appendMessage ( string $folderid, string | stream $msg, array $flags = [] ) : integer | boolean
$folderid string The mailbox
$msg string | stream The message
$flags array Any flags to set on the newly appended message.
리턴 integer | boolean The imap uid of the appended message or false on failure. @since 2.37.0

categoriesToFlags() 공개 메소드

public categoriesToFlags ( $mailbox, $categories, $uid )

createMailbox() 공개 메소드

Create a new mailbox on the server, and subscribe to it.
public createMailbox ( string $name, string $parent = null ) : string
$name string The new mailbox name.
$parent string The parent mailbox, if any. @return string The new serverid for the mailbox. This is the UTF-8 name of the mailbox. @since 2.9.0 @throws Horde_ActiveSync_Exception, Horde_ActiveSync_Exception_FolderExists
리턴 string

deleteMailbox() 공개 메소드

Delete a mailbox
public deleteMailbox ( string $name )
$name string The mailbox name to delete.

deleteMessages() 공개 메소드

Permanently delete a mail message.
public deleteMessages ( array $uids, string $folderid ) : array
$uids array The message UIDs
$folderid string The folder id.
리턴 array An array of uids that were successfully deleted.

emptyMailbox() 공개 메소드

Completely empty specified mailbox.
부터: 2.18.0
public emptyMailbox ( string $mbox )
$mbox string The mailbox to empty.

getAttachment() 공개 메소드

Return the content of a specific MIME part of the specified message.
public getAttachment ( string $mailbox, string $uid, string $part ) : Horde_Mime_Part
$mailbox string The mailbox name.
$uid string The message UID.
$part string The MIME part identifier.
리턴 Horde_Mime_Part The attachment data

getImapMessage() 공개 메소드

Return a complete Horde_ActiveSync_Imap_Message object for the requested uid.
public getImapMessage ( string $mailbox, array | integer $uid, array $options = [] ) : array
$mailbox string The mailbox name.
$uid array | integer The message uid.
$options array Additional options: - headers: (boolean) Also fetch the message headers if this is true. DEFAULT: false (Do not fetch headers).
리턴 array An array of Horde_ActiveSync_Imap_Message objects.

getMailboxes() 공개 메소드

Return an array of available mailboxes. Uses's the mail/mailboxList API method for obtaining the list.
public getMailboxes ( ) : array
리턴 array

getMessageChanges() 공개 메소드

Return message changes from the specified mailbox.
public getMessageChanges ( Horde_ActiveSync_Folder_Imap $folder, array $options = [] ) : Horde_ActiveSync_Folder_Imap
$folder Horde_ActiveSync_Folder_Imap The folder object.
$options array Additional options: - sincedate: (integer) Timestamp of earliest message to retrieve. DEFAULT: 0 (Don't filter). - protocolversion: (float) EAS protocol version to support. DEFAULT: none REQUIRED - softdelete: (boolean) If true, calculate SOFTDELETE data. @since 2.8.0 - refreshfilter: (boolean) If true, force refresh the query to reflect changes in FILTERTYPE (using the sincedate) @since 2.28.0
리턴 Horde_ActiveSync_Folder_Imap The folder object, containing any change instructions for the device.

getMessages() 공개 메소드

Return AS mail messages, from the given IMAP UIDs.
public getMessages ( string $folderid, array $messages, array $options = [] ) : array
$folderid string The mailbox folder.
$messages array List of IMAP message UIDs
$options array Additional Options: - truncation: (integer) The truncation constant, if sent from device. DEFAULT: false (No truncation). - bodyprefs: (array) The bodypref settings, if sent from device. DEFAULT: none (No body prefs sent, or enforced). - bodypartprefs: (array) The bodypartprefs settings, if present. - 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 version to support. DEFAULT: 2.5
리턴 array An array of Horde_ActiveSync_Message_Mail objects.

getSpecialMailboxes() 공개 메소드

Return the list of special mailboxes.
public getSpecialMailboxes ( ) : array
리턴 array

getUidFromMid() 공개 메소드

Return an array of message UIDs from a list of Message-IDs.
public getUidFromMid ( string $mid, Horde_ActiveSync_Folder_Imap $folder ) : integer
$mid string The Message-ID
$folder Horde_ActiveSync_Folder_Imap The folder object to search.
리턴 integer The UID

getUidFromMidInFolders() 공개 메소드

Attempt to find a Message-ID in a list of mail folders.
사용 중단: This is unused and should be removed.
public getUidFromMidInFolders ( $id, array $folders ) : array
$folders array
리턴 array An array with the 0 element being the mbox

moveMessage() 공개 메소드

Move a mail message
public moveMessage ( string $folderid, array $ids, string $newfolderid ) : array
$folderid string The existing folderid.
$ids array The message UIDs of the messages to move.
$newfolderid string The folder id to move $id to.
리턴 array An hash of oldUID => newUID.

ping() 공개 메소드

Ping a mailbox. This detects only if any new messages have arrived in the specified mailbox.
public ping ( Horde_ActiveSync_Folder_Imap $folder ) : boolean
$folder Horde_ActiveSync_Folder_Imap The folder object.
리턴 boolean True if changes were detected, otherwise false.

queryMailbox() 공개 메소드

Perform a search from a search mailbox request.
public queryMailbox ( array $query ) : array
$query array The query array.
리턴 array An array of 'uniqueid', 'searchfolderid' hashes.

renameMailbox() 공개 메소드

Rename a mailbox
public renameMailbox ( string $old, string $new, string $parent = null ) : string
$old string The old mailbox name.
$new string The new mailbox name.
$parent string The parent mailbox, if any.
리턴 string The new serverid for the mailbox. @since 2.9.0

setImapFlag() 공개 메소드

Set a IMAP message flag.
public setImapFlag ( string $mailbox, integer $uid, string $flag )
$mailbox string The mailbox name.
$uid integer The message UID.
$flag string The flag to set. A Horde_ActiveSync:: constant.

setLogger() 공개 메소드

Set this instance's logger.
public setLogger ( Horde_Log_Logger $logger )
$logger Horde_Log_Logger The logger.

setMessageFlag() 공개 메소드

Set a POOMMAIL_FLAG on a mail message. This method differs from setReadFlag() in that it is passed a Flag object, which contains other data beside the seen status. Used for setting flagged for followup and potentially creating tasks based on the email.
public setMessageFlag ( string $mailbox, integer $uid, Horde_ActiveSync_Message_Flag $flag )
$mailbox string The mailbox name.
$uid integer The message uid.
$flag Horde_ActiveSync_Message_Flag The flag

setReadFlag() 공개 메소드

Set the message's read status.
public setReadFlag ( string $mailbox, string $uid, integer $flag )
$mailbox string The mailbox name.
$uid string The message uid.
$flag integer Horde_ActiveSync_Message_Mail::FLAG_* constant

프로퍼티 상세

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

protected string $_defaultNamespace
리턴 string

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

protected Horde_ActiveSync_Interface_ImapFactory $_imap
리턴 Horde_ActiveSync_Interface_ImapFactory

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

protected Horde_Log_Logger $_logger
리턴 Horde_Log_Logger

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

Process id used for logging.
protected int $_procid
리턴 integer