PHP Класс Horde_Core_ActiveSync_Driver, horde

Copyright 2010-2014 Horde LLC (http://www.horde.org/)
Автор: Michael J. Rubinsky ([email protected])
Наследование: extends Horde_ActiveSync_Driver_Base
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_auth Horde_Core_ActiveSync_Auth Authentication object
$_classMap array Class => Id map
$_connector Horde_Core_ActiveSync_Connector Horde connector instance
$_displayMap array Mappings for server uids -> display names. Populated in the const'r so we can use localized text.
$_folders array Local cache of folders polled from the various backends.
$_imap Horde_ActiveSync_Imap_Adapter Imap client adapter
$_modCache Cache message stats
$_pid integer Current process id
$_verbs array Local cache of last verb searches.

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

Метод Описание
__construct ( array $params = [] ) Const'r
authenticate ( string $username, string $password, string $domain = null ) : mixed Authenticate to Horde
autoDiscover ( array $params = [] ) : array Attempt to autodiscover. Autodiscovery happens before the user is authenticated, and ALWAYS uses the user's email address. We have to do our best to translate email address to username. If this fails, the device simply falls back to requiring full user configuration.
buildFbString ( stdClass $fb, Horde_Date $start, Horde_Date $end ) : string Build a EAS style FB string. Essentially, each digit represents 1/2 hour.
changeFolder ( string $old_name, string $new_name, string $parent, string $uid = null, integer $type = null ) : Horde_ActiveSync_Message_Folder Change a folder on the server.
changeMessage ( string $folderid, string $id, Horde_ActiveSync_Message_Base $message, Horde_ActiveSync_Device $device ) : array | boolean Add/Edit a message
clearAuthentication ( ) Clean up
createDeviceCallback ( Horde_ActiveSync_Device $device ) : boolean | integer Callback method called before new device is created for a user. Allows final check of permissions.
deleteFolder ( string $id, string $parent = Horde_ActiveSync::FOLDER_ROOT ) Delete a folder on the server.
deleteMessage ( string $folderid, array $ids, boolean $instanceids = false ) : array Delete a message
deviceCallback ( Horde_ActiveSync_Device $device ) : boolean | integer Callback that allows custom policy checking on the device before allowing it to connect. Useful for things like limiting the types of devices that can connect e.g., not allowing iOS devices etc.
getAttachment ( string $name, array $options = [] ) : array Return the specified attachment.
getCurrentPolicy ( boolean | array $device = false ) : array Return the security policies.
getFolder ( string $id ) : Horde_ActiveSync_Message_Folder Return a Horde_ActiveSync_Message_Folder object.
getFolderList ( ) : array Return an array of stats for the server's folder list.
getFolders ( ) : array Return an array of the server's folder objects.
getFreebusy ( $user, array $options = [] ) Request freebusy information from the server
getMessage ( string $folderid, string $id, array $collection ) : Horde_ActiveSync_Message_Base Obtain an ActiveSync message from the backend.
getProvisioning ( Horde_ActiveSync_Device $device = null ) : mixed Returns the provisioning support for the current request.
getSearchResults ( string $type, array $query ) : array Returns array of items which contain contact information
getServerChanges ( Horde_ActiveSync_Folder_Base $folder, integer $from_ts, integer $to_ts, integer $cutoffdate, boolean $ping, boolean $ignoreFirstSync = false, integer $maxitems = 100, boolean $refreshFilter = false ) : array Get a list of server changes that occured during the specified time period.
getSettings ( array $settings, stdClass $device ) : array Return settings from the backend for a SETTINGS request.
getSpecialFolderNameByType ( string $type ) : string | boolean Return the server id of the specified special folder type.
getSyncStamp ( string $collection, integer $last = null ) : integer | boolean Return the SyncStamp - the value used to determine the end of the current sync range. If the collection backend supports modification sequences, we will use that, otherwise return the current timestamp.
getUsernameFromEmail ( string $email ) : string Attempt to guess a username based on the email address passed from EAS Autodiscover requests.
getWasteBasket ( $class ) : string | boolean Get the wastebasket folder. If this returns false, imap deletions are permanent. If it returns a valid mailbox, deletions are treated as moves to this mailbox. Note that any collection class other than Horde_ActiveSync::CLASS_EMAIL will return false.
itemOperationsEmptyFolder ( array $params ) Empty specified mailbox.
itemOperationsFetchMailbox ( string $longid, array $bodyprefs, integer $mimesupport ) : Horde_ActiveSync_Message_Base Return Horde_Imap_Message_Mail object represented by the specified longid. Used to fetch email objects from a search result, which only returns a 'longid'.
itemOperationsGetAttachmentData ( string $filereference ) : Horde_ActiveSync_Message_AirSyncBaseFileAttachment Return the specified attachement data for an ITEMOPERATIONS request.
itemOperationsGetDocumentLibraryLink ( string $linkid, array $cred ) : array Return a documentlibrary item.
meetingResponse ( array $response ) : string Handle meeting responses.
modifyDeviceCallback ( Horde_ActiveSync_Device $device ) : Horde_ActiveSync_Device Allow modification of device properties before request processing continues.
moveMessage ( string $folderid, array $ids, string $newfolderid ) : array Move message
resolveRecipient ( string $type, string $search, array $opts = [] ) : array Handle ResolveRecipient requests
sendMail ( mixed $rfc822, integer | boolean $forward = false, integer | boolean $reply = false, string $parent = false, boolean $save = true, Horde_ActiveSync_Message_SendMail $message = null ) : boolean Sends the email represented by the rfc822 string received by the PIM.
setLogger ( Horde_Log_Logger $logger ) Set the logger.
setReadFlag ( string $folderId, string $id, integer $flags ) Set the read (\seen) flag on the specified message.
setSettings ( array $settings, stdClass $device ) : array Set backend settings from a SETTINGS request.
setup ( string $user ) : boolean Setup sync parameters. The user provided here is the user the backend will sync with. This allows you to authenticate as one user, and sync as another, if the backend supports this (Horde does not).
statFolder ( string $id, mixed $parent = '0', mixed $mod = null, string $serverid = null, integer $type = null ) : a Stat folder. Note that since the only thing that can ever change for a folder is the name, we use that as the 'mod' value.
statMailMessage ( string $folderid, integer | array $id ) : array Build a stat structure for an email message.
statMessage ( $folderid, $id ) Get message stat data

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

Метод Описание
_buildDummyFolder ( $id )
_buildNonMailFolder ( string $id, stirng $parent, integer $type, string $name ) : Horde_ActiveSync_Message_Folder Helper to build a folder object for non-email folders.
_endBuffer ( ) End output buffering, log any unexpected output.
_getFolder ( string $id, array $params = [] ) : Horde_ActiveSync_Message_Folder Factory for creating new Horde_ActiveSync_Message_Folder objects from within this class.
_getIdentityFromAddress ( ) : string Return the current user's From/Reply_To address.
_getLastVerb ( string $mid ) : array Return the last verb executed for the specified Message-ID.
_getMailFolder ( string $sid, array $fl, array $f ) : Horde_ActiveSync_Message_Folder Return a folder object representing an email folder. Attempt to detect special folders appropriately.
_getMailFolders ( ) : array Return the list of mail server folders.
_getMaillogChanges ( Horde_ActiveSync_Folder_Imap $folder, integer $ts ) : Horde_ActiveSync_Folder_Imap Get verb changes from the maillog.
_getPolicyFromPerms ( boolean $deviceinfo = false ) : array Return a policy array suitable for transforming into either wbxml or xml to send to the device in the provision response.
_getPolicyValue ( $policy, $allowed )
_mungeCert ( string $cert ) : string Removes the beginning/ending delimiters from the certificate.
_parseFolderId ( string $id, boolean $checkEmail = false ) : string | array Parse a folderid.
_searchGal ( array $query ) : array Perform a search of the Global Address Book.
_searchMailbox ( array $query ) : array Perform a search of the email store.
_smartStatMessage ( string $folderid, string $id, boolean $hint ) : message Stat a backend item, optionally using the cached value if available.

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

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

Const'r
public __construct ( array $params = [] )
$params array Configuration parameters: - logger: (Horde_Log_Logger) The logger. DEFAULT: none (No logging). - state: (Horde_ActiveSync_State_Base) The state driver. DEFAULT: none (REQUIRED). - connector: (Horde_Core_ActiveSync_Connector) The connector object for communicating with the registry. DEFAULT: none (REQUIRED) - auth: (Horde_Core_ActiveSync_Auth) The auth object. DEFAULT: none (REQUIRED). - imap: (Horde_ActiveSync_Imap_Adapter) The IMAP adapter if email support is desired. DEFAULT: none (No email support will be provided). - cache: (Horde_Cache) A cache object to store certain types of data, such as mailbox search results. @since 2.12.0

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

protected _buildDummyFolder ( $id )

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

Helper to build a folder object for non-email folders.
protected _buildNonMailFolder ( string $id, stirng $parent, integer $type, string $name ) : Horde_ActiveSync_Message_Folder
$id string The folder's server id.
$parent stirng The folder's parent id.
$type integer The folder type.
$name string The folder description.
Результат Horde_ActiveSync_Message_Folder The folder object.

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

End output buffering, log any unexpected output.
protected _endBuffer ( )

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

For BC reasons, we need to still accept the *_FOLDER_UID constants and they should represent folders that are multiplexed.
protected _getFolder ( string $id, array $params = [] ) : Horde_ActiveSync_Message_Folder
$id string The folder's server id.
$params array Additional folder parameters: - class: The collection class, a Horde_ActiveSync::CLASS_* constant - primary: This folder is the 'default' collection for this class. - display: The display name for FOLDER_TYPE_USER folders.
Результат Horde_ActiveSync_Message_Folder The folder object.

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

Return the current user's From/Reply_To address.
protected _getIdentityFromAddress ( ) : string
Результат string A RFC822 valid email string.

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

Return the last verb executed for the specified Message-ID.
protected _getLastVerb ( string $mid ) : array
$mid string The Message-ID.
Результат array The most recent history log entry array for $mid.

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

Return a folder object representing an email folder. Attempt to detect special folders appropriately.
protected _getMailFolder ( string $sid, array $fl, array $f ) : Horde_ActiveSync_Message_Folder
$sid string The server name.
$fl array The complete folder list.
$f array An array describing the folder.
Результат Horde_ActiveSync_Message_Folder

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

Return the list of mail server folders.
protected _getMailFolders ( ) : array
Результат array An array of Horde_ActiveSync_Message_Folder objects.

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

Get verb changes from the maillog.
protected _getMaillogChanges ( Horde_ActiveSync_Folder_Imap $folder, integer $ts ) : Horde_ActiveSync_Folder_Imap
$folder Horde_ActiveSync_Folder_Imap The folder to search.
$ts integer The timestamp to start from.
Результат Horde_ActiveSync_Folder_Imap The folder object, with any changes added accordingly.

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

Return a policy array suitable for transforming into either wbxml or xml to send to the device in the provision response.
protected _getPolicyFromPerms ( boolean $deviceinfo = false ) : array
$deviceinfo boolean EAS 14.1 DEVICESETTINGS sent with PROVISION.
Результат array

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

protected _getPolicyValue ( $policy, $allowed )

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

Removes the beginning/ending delimiters from the certificate.
protected _mungeCert ( string $cert ) : string
$cert string The certificate text.
Результат string The certificate text, with delimiters removed.

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

Parse a folderid.
protected _parseFolderId ( string $id, boolean $checkEmail = false ) : string | array
$id string The folder id.
$checkEmail boolean Verify $id is not an Email collection.
Результат string | array A parsed folder array or Horde_ActiveSync::CLASS_* constant.

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

Perform a search of the Global Address Book.
protected _searchGal ( array $query ) : array
$query array A query array. @see self::getSearchResults()
Результат array The results array. @see self::getSearchResults()

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

Perform a search of the email store.
protected _searchMailbox ( array $query ) : array
$query array A query array. @see self::getSearchResults()
Результат array The results array. @see self::getSearchResults()

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

Stat a backend item, optionally using the cached value if available.
protected _smartStatMessage ( string $folderid, string $id, boolean $hint ) : message
$folderid string The folder id
$id string The message id
$hint boolean Use the cached data, if available?
Результат message stat hash

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

Authenticate to Horde
public authenticate ( string $username, string $password, string $domain = null ) : mixed
$username string The username to authenticate as (as passed by the device).
$password string The password
$domain string The user domain (unused in this driver).
Результат mixed Boolean true on success, boolean false on credential failure or Horde_ActiveSync::AUTH_REASON_* constant on policy failure.

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

Attempt to autodiscover. Autodiscovery happens before the user is authenticated, and ALWAYS uses the user's email address. We have to do our best to translate email address to username. If this fails, the device simply falls back to requiring full user configuration.
public autoDiscover ( array $params = [] ) : array
$params array Optional array of parameters.
Результат array Either an array of autodiscover parameters that the ActiveSync server will use to build the response, or the raw XML response contained in the raw_xml key.

buildFbString() публичный статический Метод

The values are as follows: 0 - Free 1 - Tentative 2 - Busy 3 - OOF 4 - No data available. Though currently we only provide a Free/Busy/Unknown differentiation.
С версии: 2.4.0
public static buildFbString ( stdClass $fb, Horde_Date $start, Horde_Date $end ) : string
$fb stdClass The fb information. An object containing: - s: The start of the period covered. - e: The end of the period covered. - b: An array of busy periods.
$start Horde_Date The start of the period requested by the client.
$end Horde_Date The end of the period requested by the client.
Результат string The EAS freebusy string.

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

Change a folder on the server.
public changeFolder ( string $old_name, string $new_name, string $parent, string $uid = null, integer $type = null ) : Horde_ActiveSync_Message_Folder
$old_name string The server's existing folder id.
$new_name string The new display name.
$parent string The folder's parent server id, if needed.
$uid string The existing folder uid, if this is an edit. @since 2.5.0 (@todo Look at this for H6. It's here now to save an extra DB lookup for data we already have.)
$type integer The EAS Folder type. @since 2.12.0
Результат Horde_ActiveSync_Message_Folder

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

Add/Edit a message
public changeMessage ( string $folderid, string $id, Horde_ActiveSync_Message_Base $message, Horde_ActiveSync_Device $device ) : array | boolean
$folderid string The server id of the message's folder.
$id string The server's uid for the message if this is a change to an existing message, false if new.
$message Horde_ActiveSync_Message_Base The activesync message.
$device Horde_ActiveSync_Device The device information @since 2.5.0
Результат array | boolean A stat array if successful, otherwise false. Contains the following keys: - id: (mixed) The UID of the message/item. - mod: (mixed) A value to indicate the last modification. - flags: (array) An array of flag chagnes, empty array if no changes. - categories: (array|boolean) An array of EAS categories for email messages that exist as IMAP flags, false if no changes. - atchash: (array|boolean) An array of clientid->filereference mappings for file attachment changes made to appointment or draft email folders. @since 2.27.0 - conversationid: (hex encoded opaque value) The conversationid value if adding Draft email message. @since 2.28.0 - conversationindex: (integer) The conversation index value if adding Draft email message @since 2.28.0

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

Clean up
public clearAuthentication ( )

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

Callback method called before new device is created for a user. Allows final check of permissions.
public createDeviceCallback ( Horde_ActiveSync_Device $device ) : boolean | integer
$device Horde_ActiveSync_Device
Результат boolean | integer True on success (device allowed to be created) or error code on failure.

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

Delete a folder on the server.
public deleteFolder ( string $id, string $parent = Horde_ActiveSync::FOLDER_ROOT )
$id string The server's folder id.
$parent string The folder's parent, if needed. @deprecated

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

Delete a message
public deleteMessage ( string $folderid, array $ids, boolean $instanceids = false ) : array
$folderid string The folder id
$ids array The message ids to delete
$instanceids boolean If true, $ids is a hash of instanceids => uids. @since 2.23.0
Результат array An array of succesfully deleted messages (currently only guarenteed for email messages).

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

.
public deviceCallback ( Horde_ActiveSync_Device $device ) : boolean | integer
$device Horde_ActiveSync_Device The device object.
Результат boolean | integer True on success (device allowed to be created) or error code on failure.

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

Return the specified attachment.
public getAttachment ( string $name, array $options = [] ) : array
$name string The attachment identifier. For this driver, this consists of 'mailbox:uid:mimepart'
$options array Any options requested. Currently supported: - stream: (boolean) Return a stream resource for the mime contents. DEFAULT: true (Return a stream resource for the 'data' value).
Результат array The attachment in the form of an array with the following structure: array('content-type' => {the content-type of the attachement}, 'data' => {the raw attachment data})

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

Return the security policies.
public getCurrentPolicy ( boolean | array $device = false ) : array
$device boolean | array The device information sent by EAS 14.1 set to false otherwise.
Результат array An array of provisionable properties and values.

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

Return a Horde_ActiveSync_Message_Folder object.
public getFolder ( string $id ) : Horde_ActiveSync_Message_Folder
$id string The folder's server id.
Результат Horde_ActiveSync_Message_Folder

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

Return an array of stats for the server's folder list.
public getFolderList ( ) : array
Результат array An array of folder stats @see self::statFolder()

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

Return an array of the server's folder objects.
public getFolders ( ) : array
Результат array An array of Horde_ActiveSync_Message_Folder objects.

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

Request freebusy information from the server
Устаревший: Will be removed in H6 - this is provided via self::resolveRecipients().
public getFreebusy ( $user, array $options = [] )
$options array

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

Obtain an ActiveSync message from the backend.
public getMessage ( string $folderid, string $id, array $collection ) : Horde_ActiveSync_Message_Base
$folderid string The server's folder id this message is from
$id string The server's message id
$collection array The colletion data. May contain things like: - mimesupport: (integer) Indicates if the device has MIME support. DEFAULT: 0 (No MIME support) - truncation: (integer) Non-MIME truncation limit. Anything larger than this amount of bytes will be truncated. DEFAULT: 0 (No truncation) - mimetruncation: (integer) MIME truncation limit. Anything larger than this amount of bytes will be truncated. DEFAULT: 0 (No truncation) - bodyprefs: (array) The bodypref array from the device. - type: (integer) The Horde_ActiveSync::FOLDER_TYPE_* for this collection.
Результат Horde_ActiveSync_Message_Base The message data

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

Returns the provisioning support for the current request.
public getProvisioning ( Horde_ActiveSync_Device $device = null ) : mixed
$device Horde_ActiveSync_Device The device object. @since 2.16.0
Результат mixed The value of the provisiong support flag.

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

Returns array of items which contain contact information
public getSearchResults ( string $type, array $query ) : array
$type string The search type; ['gal'|'mailbox']
$query array The search query. An array containing: - query: (array) The search query. Contains at least: 'query' and 'range'. The rest depends on the type of search being performed. DEFAULT: none, REQUIRED - range: (string) A range limiter. DEFAULT: none (No range used). - rebuildresults: (boolean) If true, invalidate any cached search. DEFAULT: Use cached search results if available. - deeptraversal: (boolean) If true, traverse sub folders. @todo NOT IMPLEMENTED YET.
Результат array An array containing: - rows: An array of search results, limited by $query['range']. - status: The search store status code. - total: The total number of matches (not limited by $query['range']

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

Get a list of server changes that occured during the specified time period.
public getServerChanges ( Horde_ActiveSync_Folder_Base $folder, integer $from_ts, integer $to_ts, integer $cutoffdate, boolean $ping, boolean $ignoreFirstSync = false, integer $maxitems = 100, boolean $refreshFilter = false ) : array
$folder Horde_ActiveSync_Folder_Base The ActiveSync folder object to request changes for.
$from_ts integer The starting timestamp
$to_ts integer The ending timestamp
$cutoffdate integer The earliest date to retrieve back to.
$ping boolean If true, returned changeset may not contain the full changeset, but rather only a single change, designed only to indicate *some* change has taken place. The value should not be used to determine *what* change has taken place.
$ignoreFirstSync boolean If true, will not trigger an initial sync if $from_ts is 0. Needed to avoid race conditions when we don't have any history data. @since 2.6.0 @todo If we can pass the synckey ( perhaps as part of $folder), we can just look for synckey 0 to know when we CAN trigger an initial sync without this flag.
$maxitems integer Maximum number of recipients for a RI collection. @since 2.12.0
$refreshFilter boolean Force a SOFTDELETE operation and check for new items within the (newly changed) current FilterType interval. @since 2.19.0
Результат array An array of hashes that contain the ids of items that have changed in the specified collection along with a 'type' flag that indicates the type of change.

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

Return settings from the backend for a SETTINGS request.
public getSettings ( array $settings, stdClass $device ) : array
$settings array An array of settings to return. Currently supported: - oof: The out of office message information. @todo - userinformation: UserInformation requests. - emailaddresses: User's From email addresses. - primarysmtpaddress: (@deprecated) The SMTP address used for the default account. Only supported in EAS >= 14.1 using accounts. - status: EAS status code. - accounts: Array with each entry containing emailaddresses, fullname for additional identities. The primary address should be the first in the emailaddresses array.
$device stdClass The device to obtain settings for.
Результат array The requested settings.

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

Return the server id of the specified special folder type.
public getSpecialFolderNameByType ( string $type ) : string | boolean
$type string The self::SPECIAL_* constant.
Результат string | boolean The folder's server id or false on failure.

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

Return the SyncStamp - the value used to determine the end of the current sync range. If the collection backend supports modification sequences, we will use that, otherwise return the current timestamp.
С версии: 2.6.0
public getSyncStamp ( string $collection, integer $last = null ) : integer | boolean
$collection string The collection id we are currently requesting.
$last integer The last syncstamp, if known. Used to help sanity check the state.
Результат integer | boolean The SyncStamp or false if an error is encountered.

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

Attempt to guess a username based on the email address passed from EAS Autodiscover requests.
public getUsernameFromEmail ( string $email ) : string
$email string The email address
Результат string The username to use to authenticate to Horde with.

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

Get the wastebasket folder. If this returns false, imap deletions are permanent. If it returns a valid mailbox, deletions are treated as moves to this mailbox. Note that any collection class other than Horde_ActiveSync::CLASS_EMAIL will return false.
public getWasteBasket ( $class ) : string | boolean
Результат string | boolean Returns name of the trash folder, or false if not using a trash folder.

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

Empty specified mailbox.
С версии: 2.14.0
public itemOperationsEmptyFolder ( array $params )
$params array An array of parameters: - folderid: The backend folderid of the mailbox to empty. - subfolders: IGNORED for now.

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

Return Horde_Imap_Message_Mail object represented by the specified longid. Used to fetch email objects from a search result, which only returns a 'longid'.
public itemOperationsFetchMailbox ( string $longid, array $bodyprefs, integer $mimesupport ) : Horde_ActiveSync_Message_Base
$longid string The unique search result identifier. Consists of mailbox:uid E.g, INBOX:110
$bodyprefs array The bodypreference array.
$mimesupport integer Mimesupport flag. A Horde_ActiveSync::MIME_SUPPORT_* constant.
Результат Horde_ActiveSync_Message_Base The message requested.

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

Return the specified attachement data for an ITEMOPERATIONS request.
public itemOperationsGetAttachmentData ( string $filereference ) : Horde_ActiveSync_Message_AirSyncBaseFileAttachment
$filereference string The attachment identifier.
Результат Horde_ActiveSync_Message_AirSyncBaseFileAttachment

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

Handle meeting responses.
public meetingResponse ( array $response ) : string
$response array The response data. Contains: - requestid: The identifier of the meeting request. Used by the server to fetch the original meeting request details. - response: The user's response to the request. One of the response code constants. - folderid: The collection id that contains the meeting request. -
Результат string The UID of any created calendar entries, otherwise false.

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

Allow modification of device properties before request processing continues.
public modifyDeviceCallback ( Horde_ActiveSync_Device $device ) : Horde_ActiveSync_Device
$device Horde_ActiveSync_Device The device object.
Результат Horde_ActiveSync_Device The possibly modified device object.

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

Move message
public moveMessage ( string $folderid, array $ids, string $newfolderid ) : array
$folderid string Existing folder id.
$ids array Message UIDs to move. @todo For H6 this should take a single id. We can't bulk move them for other reasons.
$newfolderid string The new folder id to move to.
Результат array An array of successfully moved messages with the old UIDs as keys and new UIDs as values.

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

Handle ResolveRecipient requests
public resolveRecipient ( string $type, string $search, array $opts = [] ) : array
$type string The type of recipient request. e.g., 'certificate'
$search string The email to resolve.
$opts array Any options required to perform the resolution. - maxcerts: (integer) The maximum number of certificates to return as provided by the client. - maxambiguous: (integer) The maximum number of ambiguous results. If set to zero, we MUST have an exact match. - starttime: (Horde_Date) The start time for the availability window if requesting AVAILABILITY. - endtime: (Horde_Date) The end of the availability window if requesting AVAILABILITY. - maxsize: (integer) The maximum size of any pictures. DEFAULT: 0 (No limit). - maxpictures: (integer) The maximum count of images to return. DEFAULT: - (No limit). - pictures: (boolean) Return pictures.
Результат array An array of results containing any of the following: - type: (string) The type of result a GAL entry or personal address book entry. A Horde_ActiveSync::RESOLVE_RESULT constant. - displayname: (string) The display name of the contact. - emailaddress: (string) The emailaddress. - entries: (array) An array of certificates. - availability: (string) A EAS style FB string. - picture: (Horde_ActiveSync_Message_ResolveRecipientsPicture)

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

Sends the email represented by the rfc822 string received by the PIM.
public sendMail ( mixed $rfc822, integer | boolean $forward = false, integer | boolean $reply = false, string $parent = false, boolean $save = true, Horde_ActiveSync_Message_SendMail $message = null ) : boolean
$rfc822 mixed The rfc822 mime message, a string or stream resource.
$forward integer | boolean The UID of the message, if forwarding or true if forwarding and EAS >= 14.0
$reply integer | boolean The UID of the message if replying or true if replying and EAS >= 14.0
$parent string The collection id of parent message if forwarding/replying.
$save boolean Save in sent messages.
$message Horde_ActiveSync_Message_SendMail The entire message object for EAS 14+ requests. @since 2.5.0
Результат boolean

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

Set the logger.
public setLogger ( Horde_Log_Logger $logger )
$logger Horde_Log_Logger The logger.

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

Set the read (\seen) flag on the specified message.
Устаревший: Will be removed in Horde 6. Here for BC with Horde_ActiveSync 2.4
public setReadFlag ( string $folderId, string $id, integer $flags )
$folderId string The folder id containing the message.
$id string The message uid.
$flags integer The value to set the flag to.

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

Set backend settings from a SETTINGS request.
public setSettings ( array $settings, stdClass $device ) : array
$settings array The settings to store. Currently supported: - oof: (array) The Out of Office message.
$device stdClass The device to store settings for.
Результат array An array of status responses for each set request. e.g.,: array('oof' => Horde_ActiveSync_Request_Settings::STATUS_SUCCESS);

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

Setup sync parameters. The user provided here is the user the backend will sync with. This allows you to authenticate as one user, and sync as another, if the backend supports this (Horde does not).
public setup ( string $user ) : boolean
$user string The username to sync as on the backend.
Результат boolean

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

Stat folder. Note that since the only thing that can ever change for a folder is the name, we use that as the 'mod' value.
public statFolder ( string $id, mixed $parent = '0', mixed $mod = null, string $serverid = null, integer $type = null ) : a
$id string The folder's EAS uid
$parent mixed The parent folder (or 0 if none).
$mod mixed Modification indicator. For folders, this is the display name of the folder, since that's the only thing that can change.
$serverid string The backend serverid for this folder.
$type integer The EAS folder type, a Horde_ActiveSync::FOLDER_TYPE_* contant. @since 2.12.0
Результат a stat hash: - id: The activesync folder identifier. - mod: The modification value. - parent: The folder's parent id. - serverid: The backend server's folder name for this folder. - type: The EAS folder type. @since 2.12.0

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

Build a stat structure for an email message.
public statMailMessage ( string $folderid, integer | array $id ) : array
$folderid string The mailbox name.
$id integer | array The message(s) to stat (IMAP UIDs).
Результат array

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

Get message stat data
public statMessage ( $folderid, $id )

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

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

Authentication object
protected Horde_Core_ActiveSync_Auth $_auth
Результат Horde_Core_ActiveSync_Auth

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

Class => Id map
protected array $_classMap
Результат array

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

Horde connector instance
protected Horde_Core_ActiveSync_Connector $_connector
Результат Horde_Core_ActiveSync_Connector

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

Mappings for server uids -> display names. Populated in the const'r so we can use localized text.
protected array $_displayMap
Результат array

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

Local cache of folders polled from the various backends.
protected array $_folders
Результат array

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

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

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

Cache message stats
protected $_modCache

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

Current process id
protected int $_pid
Результат integer

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

Local cache of last verb searches.
protected array $_verbs
Результат array