PHP Класс Horde_Core_ActiveSync_Connector, horde

Provides the communication between the Horde Registry on the local machine and the ActiveSync Horde driver.
Автор: Michael J Rubinsky ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_capabilities array Cache results of capability queries
$_folderCache array Cache list of folders
$_gal string Cache the GAL to avoid hitting the contacts API multiple times.
$_logger Horde_Log_Logger The logger
$_registry Horde_Registry Horde registry

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

Метод Описание
__construct ( array $params = [] ) : Horde_ActiveSync_Driver_Horde_Connector_Registry Const'r
calendar_delete ( string $uid, string $calendar = null, string $instanceid = null ) Delete an event from Horde's calendar storage
calendar_export ( string $uid, array $options = [], string $calendar = null ) : Horde_ActiveSync_Message_Appointment Export the specified event as an ActiveSync message
calendar_getActionTimestamp ( string $uid, string $action, string $calendar = null ) : integer Return the timestamp for the last time $action was performed.
calendar_getAttachment ( string $filereference ) : array Return an event attachment.
calendar_import ( Horde_ActiveSync_Message_Appointment $content, string $calendar = null ) : string Import an event into the user's default calendar.
calendar_import16 ( Horde_ActiveSync_Message_Appointment $content, string $calendar = null ) : array Version of calendar_import capable of returning an array of values.
calendar_import_attendee ( Horde_Icalendar_vEvent $vEvent, string $attendee ) Import an event response into a user's calendar. Used for updating attendee information from a meeting response.
calendar_import_vevent ( Horde_Icalendar_vEvent $vEvent ) : string Import a Horde_Icalendar_vEvent into a user's calendar. Used for creating events from meeting invitations.
calendar_listUids ( integer $startstamp, integer $endstamp, string $calendar ) : array Get a list of events from horde's calendar api
calendar_move ( string $uid, string $source, string $target ) : string | boolean Move a calendar event.
calendar_replace ( string $uid, Horde_ActiveSync_Message_Appointment $content, string $calendar = null ) : null | array Replace the event with new data
changeFolder ( string $class, string $id, string $name ) Change an existing folder on the server.
clearAuth ( ) Clear the authentication and destroy the current session.
contacts_delete ( string | array $uid ) : boolean Delete the specified contact
contacts_export ( string $uid, array $options = [] ) : Horde_ActiveSync_Message_Contact Export the specified contact from Horde's contacts storage
contacts_getActionTimestamp ( string $uid, string $action, string $addressbook = null ) : integer Get the timestamp of the most recent occurance of $action for the specifed contact
contacts_getGal ( ) : string | boolean Get the GAL source uid.
contacts_import ( Horde_ActiveSync_Message_Contact $content, string $addressbook = null ) : mixed Import the provided contact data into Horde's contacts storage
contacts_listUids ( string $source = null ) : array Get a list of all contacts a user can see
contacts_replace ( string $uid, string $content ) Replace the specified contact with the data provided.
contacts_search ( string $query, array $options = [] ) : array Search the contacts store.
createFolder ( string $class, string $foldername ) : string | integer Create a new folder/source in the specified collection.
deleteFolder ( string $class, string $id ) Delete a folder.
files_browse ( string $path ) : array Browse VFS backend.
filters_getVacation ( ) : array | boolean Return the currently set vacation message details.
filters_setVacation ( array $setting ) Set vacation message properties.
getChanges ( string $collection, integer $from_ts, integer $to_ts, string $server_id ) : array Get all server changes for the specified collection
getFolders ( string $collection, integer $multiplex ) : array | string Return the list of folders to sync for the specified collection.
getHighestModSeq ( $collection, $id = null ) : integer Return the highest modification sequence value for the specified collection
getRecipientCache ( integer $max = 100 ) : array Returns the favouriteRecipients data for RI requests.
hasFeature ( string $feature, string $collection ) : boolean Return if the backend collection has the requested feature.
horde_getPref ( string $app, string $pref ) : mixed Obtain a user's preference setting.
horde_hasInterface ( string $api ) : string Obtain the name of the Horde application that provides the specified api interface.
horde_hasMethod ( string $method, string $api ) : boolean Wrapper around Horde_Registry::hasMethod.
horde_listApis ( ) : array Return all active api interfaces.
mail_ensureMessageFlags ( array $flags ) Add any user-defined flags to IMP's preferences.
mail_getMaillog ( string $mid ) : Horde_History_Log | false Return a Maillog entry for the specified Message-ID.
mail_getMaillogChanges ( integer $ts ) : array Poll the maillog for changes since the specified timestamp.
mail_logMaillog ( string $action, string $mid, string $recipients = null, string $folder = null ) Log a forward/reply action to the maillog.
mail_logRecipient ( $action, $recipients, $message_id )
mdnSend ( $mdn )
notes_delete ( string $id ) Delete a note from the backend.
notes_export ( string $uid, array $options = [] ) : Horde_ActiveSync_Message_Note Export a single note from the backend.
notes_getActionTimestamp ( string $uid, string $action, string $notepad = null ) : integer Return the timestamp for the last time $action was performed.
notes_import ( Horde_ActiveSync_Message_Note $message, string $notebook = null ) : string Importa a single note into the backend.
notes_listNotepads ( ) : array List notepads.
notes_listUids ( string $notepad = null ) : array List all notes in the user's default notepad.
notes_replace ( string $uid, Horde_ActiveSync_Message_Note $message ) Replace an existing task with the provided task.
resolveRecipient ( string $query, array $opts = [] ) : array Resolve a recipient
setLogger ( $logger ) Set a logger for this object.
softDelete ( string $collection, long $from_ts, long $to_ts, string $source = null ) : array Return message UIDs that should be SOFTDELETEd from the client.
tasks_delete ( string $id ) Delete a task from the backend.
tasks_export ( string $uid, array $options = [] ) : Horde_ActiveSync_Message_Task Export a single task from the backend.
tasks_getActionTimestamp ( string $uid, string $action, $tasklist = null ) : integer Return the timestamp or modseq for the last time $action was performed.
tasks_import ( Horde_ActiveSync_Message_Task $message, string $tasklist = null ) : string Import a single task into the backend.
tasks_listUids ( string $tasklist = null ) : array List all tasks in the user's default tasklist.
tasks_replace ( string $uid, Horde_ActiveSync_Message_Task $message ) Replace an existing task with the provided task.

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

Метод Описание
_ensureCalendar ( string $source ) : array Return an array of calendar sources - either the user's configured "default" calendar (if $source is empty) or the calendar specified by $soruce.
_getAppFromCollectionId ( string $collection ) : string Convert a collection id to a horde app name.
_getInterfaceFromCollectionId ( string $collection ) : string Normalize the collection ids to interface names.

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

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

Const'r
public __construct ( array $params = [] ) : Horde_ActiveSync_Driver_Horde_Connector_Registry
$params array Configuration parameters. Requires: - registry: An instance of Horde_Registry
Результат Horde_ActiveSync_Driver_Horde_Connector_Registry

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

Return an array of calendar sources - either the user's configured "default" calendar (if $source is empty) or the calendar specified by $soruce.
protected _ensureCalendar ( string $source ) : array
$source string The calendar id.
Результат array An array containing the calendar id.

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

Convert a collection id to a horde app name.
protected _getAppFromCollectionId ( string $collection ) : string
$collection string The collection id e.g., @Notes@.
Результат string The horde application name e.g., nag.

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

Normalize the collection ids to interface names.
protected _getInterfaceFromCollectionId ( string $collection ) : string
$collection string The collection id e.g., @Notes@
Результат string The Horde interface name e.g., notes

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

Delete an event from Horde's calendar storage
public calendar_delete ( string $uid, string $calendar = null, string $instanceid = null )
$uid string The UID of the event to delete
$calendar string The calendar id. @since 2.12.0 @deprecated (Not used).
$instanceid string The instanceid if this is a EAS 16.0 instance. @since 2.23.0

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

Export the specified event as an ActiveSync message
public calendar_export ( string $uid, array $options = [], string $calendar = null ) : Horde_ActiveSync_Message_Appointment
$uid string The calendar id.
$options array Options to pass to the backend exporter. - protocolversion: (float) The EAS version to support DEFAULT: 2.5 - bodyprefs: (array) A BODYPREFERENCE array. DEFAULT: none (No body prefs enforced). - truncation: (integer) Truncate event body to this length DEFAULT: none (No truncation).
$calendar string The calendar id. If null, uses multiplexed. @since 2.12.0
Результат Horde_ActiveSync_Message_Appointment The requested event.

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

Return the timestamp for the last time $action was performed.
public calendar_getActionTimestamp ( string $uid, string $action, string $calendar = null ) : integer
$uid string The UID of the event we are interested in.
$action string The action we are interested in (add, modify...).
$calendar string The calendar id, if not using multiplexed data.
Результат integer

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

Return an event attachment.
public calendar_getAttachment ( string $filereference ) : array
$filereference string A filereference pointing to the file: calendar:{calendar_id}:{event_uid}:{filename}
Результат array An array containing: 'content-type' and 'data'.

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

Import an event into the user's default calendar.
public calendar_import ( Horde_ActiveSync_Message_Appointment $content, string $calendar = null ) : string
$content Horde_ActiveSync_Message_Appointment The event content
$calendar string The calendar id. @since 2.12.0
Результат string The event's UID.

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

Needed for EAS 16 support in order to deal with the fact that attachment actions are handled within the Message object.
С версии: 2.27.0
public calendar_import16 ( Horde_ActiveSync_Message_Appointment $content, string $calendar = null ) : array
$content Horde_ActiveSync_Message_Appointment The event content
$calendar string The calendar id.
Результат array

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

Import an event response into a user's calendar. Used for updating attendee information from a meeting response.
public calendar_import_attendee ( Horde_Icalendar_vEvent $vEvent, string $attendee )
$vEvent Horde_Icalendar_vEvent The event data.
$attendee string The attendee.

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

Import a Horde_Icalendar_vEvent into a user's calendar. Used for creating events from meeting invitations.
public calendar_import_vevent ( Horde_Icalendar_vEvent $vEvent ) : string
$vEvent Horde_Icalendar_vEvent The event data.
Результат string The event's UID.

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

Get a list of events from horde's calendar api
public calendar_listUids ( integer $startstamp, integer $endstamp, string $calendar ) : array
$startstamp integer The start of time period.
$endstamp integer The end of time period
$calendar string The calendar id. If null, uses multiplexed. @since 2.12.0
Результат array

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

Move a calendar event.
С версии: 2.15.0
public calendar_move ( string $uid, string $source, string $target ) : string | boolean
$uid string The event UID.
$source string The source calendar's id.
$target string The target calendar's id.
Результат string | boolean The UID if successfully moved otherwise false.

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

Replace the event with new data
public calendar_replace ( string $uid, Horde_ActiveSync_Message_Appointment $content, string $calendar = null ) : null | array
$uid string The UID of the event to replace.
$content Horde_ActiveSync_Message_Appointment The new event.
$calendar string The calendar id. @since 2.12.0
Результат null | array May return an array of 'uid' and 'atchash' or null.

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

Change an existing folder on the server.
С версии: 2.12.0
public changeFolder ( string $class, string $id, string $name )
$class string The collection class. A Horde_ActiveSync::CLASS_* constant.
$id string The existing serverid.
$name string The new folder display name.

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

Clear the authentication and destroy the current session.
public clearAuth ( )

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

Delete the specified contact
public contacts_delete ( string | array $uid ) : boolean
$uid string | array The UID(s) of the contact(s) to remove.
Результат boolean

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

Export the specified contact from Horde's contacts storage
public contacts_export ( string $uid, array $options = [] ) : Horde_ActiveSync_Message_Contact
$uid string The contact's UID
$options array Exporter options: - protocolversion: (float) The EAS version to support DEFAULT: 2.5 - bodyprefs: (array) A BODYPREFERENCE array. DEFAULT: none (No body prefs enforced). - truncation: (integer) Truncate event body to this length DEFAULT: none (No truncation). - device: (Horde_ActiveSync_Device) The device object.
Результат Horde_ActiveSync_Message_Contact The contact object.

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

Get the timestamp of the most recent occurance of $action for the specifed contact
public contacts_getActionTimestamp ( string $uid, string $action, string $addressbook = null ) : integer
$uid string The UID of the contact to search.
$action string The action to lookup.
$addressbook string The addressbook id, if not using multiplex.
Результат integer

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

Get the GAL source uid.
public contacts_getGal ( ) : string | boolean
Результат string | boolean | boolean The address book id of the GAL, or false if not available.

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

Import the provided contact data into Horde's contacts storage
public contacts_import ( Horde_ActiveSync_Message_Contact $content, string $addressbook = null ) : mixed
$content Horde_ActiveSync_Message_Contact The contact data
$addressbook string The addessbook id. @since 2.12.0
Результат mixed string|boolean The new UID or false on failure.

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

Get a list of all contacts a user can see
public contacts_listUids ( string $source = null ) : array
$source string The source to list. If null, use multiplex. @since 2.12.0
Результат array An array of contact UIDs

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

Replace the specified contact with the data provided.
public contacts_replace ( string $uid, string $content )
$uid string The UID of the contact to replace
$content string The contact data

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

Create a new folder/source in the specified collection.
С версии: 2.12.0
public createFolder ( string $class, string $foldername ) : string | integer
$class string The collection class. A Horde_ActiveSync::CLASS_* constant.
$foldername string The name of the new folder.
Результат string | integer The new folder serverid.

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

Delete a folder.
С версии: 2.12.0
public deleteFolder ( string $class, string $id )
$class string The EAS collection class.
$id string The folder id

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

Browse VFS backend.
public files_browse ( string $path ) : array
$path string The path to browse/fetch. This should be in UNC format with the "server" portion specifying backend name. e.g., \\file\mike\file.txt or \\sql\mike\file.txt
Результат array An array of data arrays with the following structure: linkid: (string) The UNC path for this resource. name: (string) The display name of the resource. content-length: (integer) The byte size of the resource (if a file). modified: (Horde_Date) The modification time of the resource, if available. create: (Horde_Date) The creation time of the resource, if available. is_folder: (boolean) True if the resource is a folder. data: (Horde_Stream) The data, if resource is a file. content-type: (string) The MIME type of the file resource, if available. @since 2.12.0

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

Return the currently set vacation message details.
public filters_getVacation ( ) : array | boolean
Результат array | boolean The vacation rule properties or false if interface unavailable.

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

Set vacation message properties.
public filters_setVacation ( array $setting )
$setting array The vacation details.

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

Get all server changes for the specified collection
public getChanges ( string $collection, integer $from_ts, integer $to_ts, string $server_id ) : array
$collection string The collection type (a Horde interface name - calendar, contacts, tasks)
$from_ts integer Starting timestamp or modification sequence.
$to_ts integer Ending timestamp or modification sequence.
$server_id string The server id of the collection. If null, uses multiplexed.
Результат array A hash of add, modify, and delete uids

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

Return the list of folders to sync for the specified collection.
С версии: 2.12.0
public getFolders ( string $collection, integer $multiplex ) : array | string
$collection string The collection class A Horde_ActiveSync::CLASS_* constant.
$multiplex integer A bitmask flagging the collections that must be multiplexed, regardless of horde's settings
Результат array | string A list of folder uids or $collection if supporting API is not found. If a list is returned, it is in the following format: 'uid' => array('display' => "Display Name", 'primary' => boolean)

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

Return the highest modification sequence value for the specified collection
С версии: 2.6.0
public getHighestModSeq ( $collection, $id = null ) : integer
Результат integer The modseq value.

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

Returns the favouriteRecipients data for RI requests.
public getRecipientCache ( integer $max = 100 ) : array
$max integer The maximum number of recipients to return.
Результат array An array of email addresses.

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

Return if the backend collection has the requested feature.
С версии: 2.6.0
public hasFeature ( string $feature, string $collection ) : boolean
$feature string The requested feature.
$collection string The requested collection id.
Результат boolean

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

Obtain a user's preference setting.
Устаревший: (unused)
public horde_getPref ( string $app, string $pref ) : mixed
$app string The Horde application providing the setting.
$pref string The name of the preference setting.
Результат mixed The preference value

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

Obtain the name of the Horde application that provides the specified api interface.
public horde_hasInterface ( string $api ) : string
$api string The interface name
Результат string The application name.

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

Wrapper around Horde_Registry::hasMethod.
public horde_hasMethod ( string $method, string $api ) : boolean
$method string The method name.
$api string The API to check.
Результат boolean

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

Return all active api interfaces.
public horde_listApis ( ) : array
Результат array An array of interface names.

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

Add any user-defined flags to IMP's preferences.
public mail_ensureMessageFlags ( array $flags )
$flags array An array of flags to add.

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

Return a Maillog entry for the specified Message-ID.
public mail_getMaillog ( string $mid ) : Horde_History_Log | false
$mid string The Message-ID of the message.
Результат Horde_History_Log | false The history log or false if not found.

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

Poll the maillog for changes since the specified timestamp.
public mail_getMaillogChanges ( integer $ts ) : array
$ts integer The timestamp to check since.
Результат array An array of Message-IDs that have changed since $ts.

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

Log a forward/reply action to the maillog.
public mail_logMaillog ( string $action, string $mid, string $recipients = null, string $folder = null )
$action string The action to log. One of: 'forward', 'reply', 'reply_all'.
$mid string The Message-ID to log.
$recipients string The recipients the mail was forwarded to.
$folder string The sent-mail folder. @since Horde_Core 2.27.0

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

public mail_logRecipient ( $action, $recipients, $message_id )

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

public mdnSend ( $mdn )

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

Delete a note from the backend.
С версии: 5.1
public notes_delete ( string $id )
$id string The task's uid

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

Export a single note from the backend.
С версии: 5.1
public notes_export ( string $uid, array $options = [] ) : Horde_ActiveSync_Message_Note
$uid string The note uid
$options array Options to pass to the backend exporter.
Результат Horde_ActiveSync_Message_Note The note message object

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

Return the timestamp for the last time $action was performed.
С версии: 5.1
public notes_getActionTimestamp ( string $uid, string $action, string $notepad = null ) : integer
$uid string The UID of the task we are interested in.
$action string The action we are interested in (add, modify...)
$notepad string The notepad to use, if not using multiplex.
Результат integer

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

Importa a single note into the backend.
С версии: 5.1
public notes_import ( Horde_ActiveSync_Message_Note $message, string $notebook = null ) : string
$message Horde_ActiveSync_Message_Note The note message object
$notebook string The notebook id. @since 2.12.0
Результат string The newly added notes's uid.

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

List notepads.
Устаревший: - @todo was never used, remove in H6.
С версии: 5.1
public notes_listNotepads ( ) : array
Результат array

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

List all notes in the user's default notepad.
С версии: 5.1
public notes_listUids ( string $notepad = null ) : array
$notepad string The notepad id to list. If null, use multiplexed. @since 2.12.0
Результат array An array of note uids.

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

Replace an existing task with the provided task.
С версии: 5.1
public notes_replace ( string $uid, Horde_ActiveSync_Message_Note $message )
$uid string The existing tasks's uid
$message Horde_ActiveSync_Message_Note The task object

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

Resolve a recipient
public resolveRecipient ( string $query, array $opts = [] ) : array
$query string The search string. Ususally an email address.
$opts array Any additional options: - 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 The search results, keyed by the $query.

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

Set a logger for this object.
public setLogger ( $logger )

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

Return message UIDs that should be SOFTDELETEd from the client.
public softDelete ( string $collection, long $from_ts, long $to_ts, string $source = null ) : array
$collection string The collection type.
$from_ts long The start of the time period to search.
$to_ts long The end of the time period to search.
$source string Limit to this source only. @since 2.12.0
Результат array An array of message UIDs that occur within the $from_ts and $to_ts range that are to be SOFTDELETEd from the client.

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

Delete a task from the backend.
public tasks_delete ( string $id )
$id string The task's uid

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

Export a single task from the backend.
public tasks_export ( string $uid, array $options = [] ) : Horde_ActiveSync_Message_Task
$uid string The task uid
$options array Options to pass to the backend exporter.
Результат Horde_ActiveSync_Message_Task The task message object

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

Return the timestamp or modseq for the last time $action was performed.
public tasks_getActionTimestamp ( string $uid, string $action, $tasklist = null ) : integer
$uid string The UID of the task we are interested in.
$action string The action we are interested in (add, modify...)
Результат integer

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

Import a single task into the backend.
public tasks_import ( Horde_ActiveSync_Message_Task $message, string $tasklist = null ) : string
$message Horde_ActiveSync_Message_Task The task message object
$tasklist string The tasklist id. @since 2.12.0
Результат string The newly added task's uid.

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

List all tasks in the user's default tasklist.
public tasks_listUids ( string $tasklist = null ) : array
$tasklist string The tasklist to check. If null, use multiplexed.
Результат array An array of task uids.

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

Replace an existing task with the provided task.
public tasks_replace ( string $uid, Horde_ActiveSync_Message_Task $message )
$uid string The existing tasks's uid
$message Horde_ActiveSync_Message_Task The task object

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

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

Cache results of capability queries
protected array $_capabilities
Результат array

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

Cache list of folders
protected array $_folderCache
Результат array

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

Cache the GAL to avoid hitting the contacts API multiple times.
protected string $_gal
Результат string

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

The logger
protected Horde_Log_Logger $_logger
Результат Horde_Log_Logger

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

Horde registry
protected Horde_Registry $_registry
Результат Horde_Registry