PHP Class Horde_Core_ActiveSync_Driver, horde

Copyright 2010-2014 Horde LLC (http://www.horde.org/)
Author: Michael J. Rubinsky ([email protected])
Inheritance: extends Horde_ActiveSync_Driver_Base
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_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.

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
_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.

Method Details

__construct() public méthode

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 méthode

protected _buildDummyFolder ( $id )

_buildNonMailFolder() protected méthode

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.
Résultat Horde_ActiveSync_Message_Folder The folder object.

_endBuffer() protected méthode

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

_getFolder() protected méthode

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.
Résultat Horde_ActiveSync_Message_Folder The folder object.

_getIdentityFromAddress() protected méthode

Return the current user's From/Reply_To address.
protected _getIdentityFromAddress ( ) : string
Résultat string A RFC822 valid email string.

_getLastVerb() protected méthode

Return the last verb executed for the specified Message-ID.
protected _getLastVerb ( string $mid ) : array
$mid string The Message-ID.
Résultat array The most recent history log entry array for $mid.

_getMailFolder() protected méthode

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.
Résultat Horde_ActiveSync_Message_Folder

_getMailFolders() protected méthode

Return the list of mail server folders.
protected _getMailFolders ( ) : array
Résultat array An array of Horde_ActiveSync_Message_Folder objects.

_getMaillogChanges() protected méthode

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.
Résultat Horde_ActiveSync_Folder_Imap The folder object, with any changes added accordingly.

_getPolicyFromPerms() protected méthode

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.
Résultat array

_getPolicyValue() protected méthode

protected _getPolicyValue ( $policy, $allowed )

_mungeCert() protected méthode

Removes the beginning/ending delimiters from the certificate.
protected _mungeCert ( string $cert ) : string
$cert string The certificate text.
Résultat string The certificate text, with delimiters removed.

_parseFolderId() protected méthode

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.
Résultat string | array A parsed folder array or Horde_ActiveSync::CLASS_* constant.

_searchGal() protected méthode

Perform a search of the Global Address Book.
protected _searchGal ( array $query ) : array
$query array A query array. @see self::getSearchResults()
Résultat array The results array. @see self::getSearchResults()

_searchMailbox() protected méthode

Perform a search of the email store.
protected _searchMailbox ( array $query ) : array
$query array A query array. @see self::getSearchResults()
Résultat array The results array. @see self::getSearchResults()

_smartStatMessage() protected méthode

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?
Résultat message stat hash

authenticate() public méthode

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).
Résultat mixed Boolean true on success, boolean false on credential failure or Horde_ActiveSync::AUTH_REASON_* constant on policy failure.

autoDiscover() public méthode

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.
Résultat 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() public static méthode

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.
Since: 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.
Résultat string The EAS freebusy string.

changeFolder() public méthode

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
Résultat Horde_ActiveSync_Message_Folder

changeMessage() public méthode

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
Résultat 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() public méthode

Clean up
public clearAuthentication ( )

createDeviceCallback() public méthode

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
Résultat boolean | integer True on success (device allowed to be created) or error code on failure.

deleteFolder() public méthode

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() public méthode

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
Résultat array An array of succesfully deleted messages (currently only guarenteed for email messages).

deviceCallback() public méthode

.
public deviceCallback ( Horde_ActiveSync_Device $device ) : boolean | integer
$device Horde_ActiveSync_Device The device object.
Résultat boolean | integer True on success (device allowed to be created) or error code on failure.

getAttachment() public méthode

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).
Résultat 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() public méthode

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.
Résultat array An array of provisionable properties and values.

getFolder() public méthode

Return a Horde_ActiveSync_Message_Folder object.
public getFolder ( string $id ) : Horde_ActiveSync_Message_Folder
$id string The folder's server id.
Résultat Horde_ActiveSync_Message_Folder

getFolderList() public méthode

Return an array of stats for the server's folder list.
public getFolderList ( ) : array
Résultat array An array of folder stats @see self::statFolder()

getFolders() public méthode

Return an array of the server's folder objects.
public getFolders ( ) : array
Résultat array An array of Horde_ActiveSync_Message_Folder objects.

getFreebusy() public méthode

Request freebusy information from the server
Deprecation: Will be removed in H6 - this is provided via self::resolveRecipients().
public getFreebusy ( $user, array $options = [] )
$options array

getMessage() public méthode

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.
Résultat Horde_ActiveSync_Message_Base The message data

getProvisioning() public méthode

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
Résultat mixed The value of the provisiong support flag.

getSearchResults() public méthode

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.
Résultat 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() public méthode

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
Résultat 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() public méthode

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.
Résultat array The requested settings.

getSpecialFolderNameByType() public méthode

Return the server id of the specified special folder type.
public getSpecialFolderNameByType ( string $type ) : string | boolean
$type string The self::SPECIAL_* constant.
Résultat string | boolean The folder's server id or false on failure.

getSyncStamp() public méthode

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.
Since: 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.
Résultat integer | boolean The SyncStamp or false if an error is encountered.

getUsernameFromEmail() public méthode

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
Résultat string The username to use to authenticate to Horde with.

getWasteBasket() public méthode

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
Résultat string | boolean Returns name of the trash folder, or false if not using a trash folder.

itemOperationsEmptyFolder() public méthode

Empty specified mailbox.
Since: 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() public méthode

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.
Résultat Horde_ActiveSync_Message_Base The message requested.

itemOperationsGetAttachmentData() public méthode

Return the specified attachement data for an ITEMOPERATIONS request.
public itemOperationsGetAttachmentData ( string $filereference ) : Horde_ActiveSync_Message_AirSyncBaseFileAttachment
$filereference string The attachment identifier.
Résultat Horde_ActiveSync_Message_AirSyncBaseFileAttachment

meetingResponse() public méthode

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. -
Résultat string The UID of any created calendar entries, otherwise false.

modifyDeviceCallback() public méthode

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.
Résultat Horde_ActiveSync_Device The possibly modified device object.

moveMessage() public méthode

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.
Résultat array An array of successfully moved messages with the old UIDs as keys and new UIDs as values.

resolveRecipient() public méthode

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.
Résultat 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() public méthode

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
Résultat boolean

setLogger() public méthode

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

setReadFlag() public méthode

Set the read (\seen) flag on the specified message.
Deprecation: 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() public méthode

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.
Résultat array An array of status responses for each set request. e.g.,: array('oof' => Horde_ActiveSync_Request_Settings::STATUS_SUCCESS);

setup() public méthode

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.
Résultat boolean

statFolder() public méthode

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
Résultat 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() public méthode

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).
Résultat array

statMessage() public méthode

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

Property Details

$_auth protected_oe property

Authentication object
protected Horde_Core_ActiveSync_Auth $_auth
Résultat Horde_Core_ActiveSync_Auth

$_classMap protected_oe property

Class => Id map
protected array $_classMap
Résultat array

$_connector protected_oe property

Horde connector instance
protected Horde_Core_ActiveSync_Connector $_connector
Résultat Horde_Core_ActiveSync_Connector

$_displayMap protected_oe property

Mappings for server uids -> display names. Populated in the const'r so we can use localized text.
protected array $_displayMap
Résultat array

$_folders protected_oe property

Local cache of folders polled from the various backends.
protected array $_folders
Résultat array

$_imap protected_oe property

Imap client adapter
protected Horde_ActiveSync_Imap_Adapter $_imap
Résultat Horde_ActiveSync_Imap_Adapter

$_modCache protected_oe property

Cache message stats
protected $_modCache

$_pid protected_oe property

Current process id
protected int $_pid
Résultat integer

$_verbs protected_oe property

Local cache of last verb searches.
protected array $_verbs
Résultat array