Property | Type | Description | |
---|---|---|---|
$_links | array | Links. | |
$_noPerms | array | The listing of API calls that do not require permissions checking. |
Method | Description | |
---|---|---|
addAddressbook ( string $name, array $params = [] ) : string | Create a new addressbook | |
addClient ( array $attributes = [] ) : boolean | Adds a client to the client source. | |
addField ( string | array $address = '', string $name = '', string $field = '', string $value = '', string $source = '' ) | Sets the value of the specified attribute of a contact | |
addGroup ( string $name, array $members, array $opts = [] ) : array | Adds a group (and its members) to the source provided. | |
browse ( string $path = '', array $properties = ['name', 'icon', 'browseable'] ) : array | Browses through Turba's object tree. | |
clientFields ( ) : array | Returns the available client fields. | |
commentCallback ( integer $id ) : mixed | Callback for comment API. | |
delete ( string | array $uid, string | array $sources = null ) : boolean | Deletes a contact identified by UID. | |
deleteAddressbook ( string $id ) | Delete the specified addressbook. | |
deleteClient ( string $objectId = '' ) : boolean | Deletes a client | |
deleteField ( string $address = '', string $field = '', array $sources = [] ) | Deletes a field value. | |
export ( string $uid, mixed $contentType, string | array $sources = null, array $fields = null, array $options = [] ) : mixed | Export a contact, identified by UID, in the requested contentType. | |
fields ( string $source = null ) : array | Returns a list of fields avaiable in a source. | |
getActionTimestamp ( string $uid, string $action, string | array $sources = null, boolean $modSeq = false ) : integer | Returns the timestamp of an operation for a given UID and action. | |
getAllAttributeValues ( string $field = '', array $sources = [] ) : array | Retrieves a list of all possible values of a field in specified source(s). | |
getChanges ( integer $start, integer $end, boolean $isModSeq = false, string | array $sources = null ) : array | Method for obtaining all server changes between two timestamps. | |
getChangesByModSeq ( integer $start, integer $end, string | array $sources = null ) : array | Return all changes occuring between the specified modification sequences. | |
getClient ( string $objectId = '' ) : array | Returns a contact from the client source. | |
getClientSource ( ) : string | Returns the client source name. | |
getClients ( array $objectIds = [] ) : array | Returns mulitple contacts from the client source. | |
getContact ( string $source = null, string $objectId = '' ) : array | Retrieves a contact. | |
getContacts ( string $source = '', array $objectIds = [] ) : array | Retrieves a set of contacts from a single source. | |
getDefaultShare ( ) : string | Retrieve the UID for the current user's default Turba share. | |
getField ( string $address = '', string $field = '', array $sources = [], boolean $strict = false, boolean $multiple = false ) : array | Returns a field value. | |
getGalUid ( ) : string | boolean | Retrieve the UID for the Global Address List source. | |
getGroupMembers ( string $gid, boolean $subGroups = false ) : array | Returns a list of all members belonging to a contact group. | |
getGroupMemberships ( string $user, boolean $parentGroups = false ) : array | Returns all contact groups that the specified user is a member of. | |
getGroupObject ( string $gid ) : array | Returns a contact group hash. | |
getGroupObjects ( ) : array | Returns all contact groups. | |
getHighestModSeq ( string $id = null ) : integer | Return the largest modification sequence from the history backend. | |
getOwnContactObject ( ) : array | Helper function to return the user's own contact object | |
getSourcesConfig ( type $filter = [] ) : array | Obtain an array of $cfgSource entries matching the filter criteria. | |
hasComments ( ) : boolean | Does this API allow comments? | |
import ( string $content, string $contentType = 'array', string $source = null, array $options = [] ) : string | Import a contact represented in the specified contentType. | |
listBy ( string $action, integer $timestamp, string | array $sources = null, integer $end = null, boolean $isModSeq = false ) : array | Returns an array of UIDs for contacts that have had a given action since a certain time. | |
listShares ( integer $perms = Horde_Perms::READ ) : array | Lists all shares the current user has access to. | |
listTagInfo ( array $tags = null, $user = null ) : array | Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag. | |
listTimeObjectCategories ( ) : array | Retrieves a list of available time objects categories. | |
listTimeObjects ( array $time_categories, mixed $start, mixed $end ) : array | Lists birthdays and/or anniversaries as time objects. | |
listUids ( string | array $sources = null ) : array | Returns an array of UIDs for all contacts that the current user is authorized to see. | |
listUserGroupObjects ( ) : array | GroupObject API - Lists all turba lists for the current user that can be treated as Horde_Group objects. | |
ownContact ( ) : array | Export the user's own contact as a hash. | |
ownVCard ( ) : string | Exports the user's own contact as a vCard string. | |
path_delete ( string $path ) : string | Deletes a file from the Turba tree. | |
replace ( string $uid, mixed $content, string $contentType, string | array $sources = null ) : boolean | Replaces the contact identified by UID with the content represented in the specified contentType. | |
search ( mixed $names = null, array $opts = [] ) : mixed | Returns a contact search result. | |
searchClients ( array $names = [], array $fields = [], boolean $matchBegin = false ) : array | Search for clients. | |
searchTags ( array $names, integer $max = 10, integer $from, string $resource_type = '', string $user = null, boolean $raw = false ) : array | SearchTags API: Returns an application-agnostic array (useful for when doing a tag search across multiple applications) | |
sources ( boolean $writeable = false, boolean $sync_only = false ) : array | Returns a list of available sources. | |
updateAddressbook ( string $id, array $info ) | Update an existing addressbook's name or description. | |
updateClient ( string $objectId = '', array $attributes = [] ) : boolean | Updates client data. |
Method | Description | |
---|---|---|
_encodeContent ( $content ) | ||
_getContactImageUrl ( $obj ) | ||
_getGroupObject ( $source, $key ) | ||
_getSource ( $source ) | ||
_getSources ( $sources, $synchronize = false, $end = false ) | ||
_modified ( $uid, $sources ) |
protected _getSources ( $sources, $synchronize = false, $end = false ) |
public addAddressbook ( string $name, array $params = [] ) : string | ||
$name | string | The display name for the addressbook. |
$params | array | Any addtional parameters needed. - synchronize: (boolean) If true, add address book to the list of address books to syncronize. DEFAULT: false (do not add to the list). @since 4.2.1 |
return | string | The new addressbook's id (share name). |
public addField ( string | array $address = '', string $name = '', string $field = '', string $value = '', string $source = '' ) | ||
$address | string | array | Contact email address(es). |
$name | string | Contact name. |
$field | string | Field to update. |
$value | string | Field value to set. |
$source | string | Contact source. |
public addGroup ( string $name, array $members, array $opts = [] ) : array | ||
$name | string | Group name. |
$members | array | An array of members to add to the group. Format is the same as the 'array' argument to the import() API function. |
$opts | array | Additional options:
- attr: (array) Additional attributes to add to group. - source: (string) Source to import contacts to. |
return | array | An array with the following keys:
- added: (integer) The number of addresses added to the group. - uid: (string) The uid of the group object. |
public clientFields ( ) : array | ||
return | array | An array describing the fields. |
public commentCallback ( integer $id ) : mixed | ||
$id | integer | Internal data identifier. |
return | mixed | Name of object on success, false on failure. |
public deleteAddressbook ( string $id ) | ||
$id | string | The addressbook id. |
public deleteClient ( string $objectId = '' ) : boolean | ||
$objectId | string | The unique id of the client |
return | boolean |
public export ( string $uid, mixed $contentType, string | array $sources = null, array $fields = null, array $options = [] ) : mixed | ||
$uid | string | Identify the contact to export. |
$contentType | mixed | What format should the data be in? - text/directory: Returns RFC2426 vcard3.0 - text/vcard: Returns RFC2426 vcard3.0 - text/x-vcard: Returns imc.org vcard 2.1 format. - array: Returns a raw array - activesync: Returns a Horde_ActiveSync_Message_Contact:: object |
$sources | string | array | The source(s) from which the contact will be exported. |
$fields | array | Hash of field names and Horde_SyncMl_Property properties with the requested fields. |
$options | array | Any additional options to be passed to the exporter. Currently supported: - skip_empty: (boolean) {text/vcard or text/x-vcard} Set to true to not output empty properties. DEFAULT: false. - protocolversion: (float) {activesync} The EAS version to support DEFAULT: 2.5 - bodyprefs: (array) {activesync} A BODYPREFERENCE array. DEFAULT: none (No body prefs enforced). - truncation: (integer) {activesync} Truncate event body to this length. DEFAULT: none (No truncation). |
return | mixed | The requested data. |
public fields ( string $source = null ) : array | ||
$source | string | The source name. |
return | array | An array describing the fields. Keys are the field name, values are arrays with these keys: - name: (string) Field name. - label: (string) Field label. - search: (boolean) Can this field be searched? - type: (string) See turba/config/attributes.php. |
public getActionTimestamp ( string $uid, string $action, string | array $sources = null, boolean $modSeq = false ) : integer | ||
$uid | string | The UID to look for. |
$action | string | The action to check for - add, modify, or delete. |
$sources | string | array | The source(s) for which to retrieve the history. |
$modSeq | boolean | Request a modification sequence instead of timestamp. @since 4.1.1 |
return | integer | The timestamp for this action. |
public getChanges ( integer $start, integer $end, boolean $isModSeq = false, string | array $sources = null ) : array | ||
$start | integer | The starting timestamp |
$end | integer | The ending timestamp. |
$isModSeq | boolean | If true, $start and $end are modification sequences and not timestamps. @since 4.1.1 |
$sources | string | array | The sources to check. @since 4.2.0 |
return | array | A hash with 'add', 'modify' and 'delete' arrays. |
public getClientSource ( ) : string | ||
return | string | The name of the source to use with the clients api. |
public getClients ( array $objectIds = [] ) : array | ||
$objectIds | array | client unique ids. |
return | array | An array of clients data. |
public getField ( string $address = '', string $field = '', array $sources = [], boolean $strict = false, boolean $multiple = false ) : array | ||
$address | string | Contact email address. |
$field | string | Field to get. |
$sources | array | Sources to check. |
$strict | boolean | Match the email address strictly. |
$multiple | boolean | Return more than one entry if found and true, return an error if this is false. |
return | array | An array of field value(s). |
public getGroupObject ( string $gid ) : array | ||
$gid | string | The group identifier. |
return | array | A hash defining the group. |
public getGroupObjects ( ) : array | ||
return | array | A list of group hashes. |
public getHighestModSeq ( string $id = null ) : integer | ||
$id | string | Addressbook id to return highest MODSEQ for. If null, the highest MODSEQ across all addressbooks is returned. @since 4.2.0 |
return | integer | The modseq. |
public getOwnContactObject ( ) : array | ||
return | array | An array containing the following keys: - contact: (Turba_Object) Object representing the user's own contact. - source: (string) The source of the user's own contact. |
public getSourcesConfig ( type $filter = [] ) : array | ||
$filter | type | A single key -> value hash to filter the sources. |
return | array |
public hasComments ( ) : boolean | ||
return | boolean | True if API allows comments. |
public import ( string $content, string $contentType = 'array', string $source = null, array $options = [] ) : string | ||
$content | string | The content of the contact. |
$contentType | string | What format is the data in? Currently supports array, text/directory, text/vcard, text/x-vcard, and activesync. |
$source | string | The source into which the contact will be imported. |
$options | array | Additional options: - match_on_email: (boolean) If true, will detect entry as duplicate if ANY email field matches. Useful for automatically adding contacts from an email application, such as IMP. @since 4.2.9 |
return | string | The new UID. |
public listBy ( string $action, integer $timestamp, string | array $sources = null, integer $end = null, boolean $isModSeq = false ) : array | ||
$action | string | The action to check for - add, modify, or delete. |
$timestamp | integer | The time to start the search. |
$sources | string | array | The source(s) for which to retrieve the history. |
$end | integer | The optional ending timestamp. |
$isModSeq | boolean | If true, $timestamp and $end are modification sequences and not timestamps. @since 4.1.1 |
return | array | An array of UIDs matching the action and time criteria. |
public listTagInfo ( array $tags = null, $user = null ) : array | ||
$tags | array | An optional array of tag_ids. If omitted, all tags will be included. |
return | array | An array containing tag_name, and total |
public listTimeObjectCategories ( ) : array | ||
return | array | An array of all configured time object categories. |
public listUserGroupObjects ( ) : array | ||
return | array | A hash of all visible groups in the form of group_id => group_name |
public ownContact ( ) : array | ||
return | array | The contact hash. |
public path_delete ( string $path ) : string | ||
$path | string | The path to the file. |
return | string | The event's UID. |
public replace ( string $uid, mixed $content, string $contentType, string | array $sources = null ) : boolean | ||
$uid | string | Idenfity the contact to replace. |
$content | mixed | The content of the contact. |
$contentType | string | What format is the data in? Currently supports array, text/directory, text/vcard, text/x-vcard and activesync. |
$sources | string | array | The source(s) where the contact will be replaced. |
return | boolean | Success or failure. |
public search ( mixed $names = null, array $opts = [] ) : mixed | ||
$names | mixed | The search filter values. |
$opts | array | Optional parameters: - customStrict: (array) An array of fields that must match exactly. DEFAULT: None - fields: (array) The fields to search on. DEFAULT: Search all configured search fields. - forceSource: (boolean) Whether to use the specified sources, even if they have been disabled in the preferences? DEFAULT: false - matchBegin: (boolean) Match word boundaries only? DEFAULT: false - returnFields: Only return these fields. DEFAULT: Return all fields. - rfc822Return: Return a Horde_Mail_Rfc822_List object. DEFAULT: Returns an array of search results. - sources: (array) The sources to search in. DEFAULT: Search the user's default address book - count_only: (boolean) If true, only return the count of matching results. DEFAULT: false (Return the full data set). - emailSearch: (boolean) If true, indicates this is an email search like e.g., for an autocompleter. Ensures that ALL email fields are both included in 'fields' and returned in the results, regardless of the requested returnFields value. @todo Make this a separate API method in H6 (or separate API "module", e.g., an 'email search' API). @since 4.3.0 |
return | mixed | Either a hash containing the search results or a Rfc822 List object (if 'rfc822Return' is true). |
public searchTags ( array $names, integer $max = 10, integer $from, string $resource_type = '', string $user = null, boolean $raw = false ) : array | ||
$names | array | An array of tag_names to search for. |
$max | integer | The maximum number of resources to return. |
$from | integer | The number of the resource to start with. |
$resource_type | string | The resource type [bookmark, ''] |
$user | string | Restrict results to resources owned by $user. |
$raw | boolean | Return the raw data? |
return | array | An array of results:
'title' - The title for this resource. 'desc' - A terse description of this resource. 'view_url' - The URL to view this resource. 'app' - The Horde application this resource belongs to. 'icon' - URL to an image. |
public updateAddressbook ( string $id, array $info ) | ||
$id | string | The addressbook id. |
$info | array | The info to change: - name: The addressbook's display name. - desc: The addressbook's description. |
protected array $_noPerms | ||
return | array |