Documentation

Turba_Api extends Horde_Registry_Api
in package

Turba external API interface.

This file defines Turba's external API interface. Other applications can interact with Turba through this API.

Copyright 2009-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (ASL). If you did did not receive this file, see http://www.horde.org/licenses/apache.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

license

http://www.horde.org/licenses/apache ASL

Table of Contents

$_links  : array<string|int, mixed>
Links.
$_noPerms  : array<string|int, mixed>
The listing of API calls that do not require permissions checking.
addAddressbook()  : string
Creates a new addressbook.
addClient()  : bool
Adds a client to the client source.
addField()  : mixed
Sets the value of the specified attribute of a contact
addGroup()  : array<string|int, mixed>
Adds a group (and its members) to the source provided.
browse()  : array<string|int, mixed>
Browses through Turba's object tree.
clientFields()  : array<string|int, mixed>
Returns the available client fields.
commentCallback()  : mixed
Callback for comment API.
delete()  : bool
Deletes a contact identified by UID.
deleteAddressbook()  : mixed
Delete the specified addressbook.
deleteClient()  : bool
Deletes a client
deleteField()  : mixed
Deletes a field value.
export()  : mixed
Export a contact, identified by UID, in the requested contentType.
fields()  : array<string|int, mixed>
Returns a list of fields avaiable in a source.
getActionTimestamp()  : int
Returns the timestamp of an operation for a given UID and action.
getAllAttributeValues()  : array<string|int, mixed>
Retrieves a list of all possible values of a field in specified source(s).
getChanges()  : array<string|int, mixed>
Method for obtaining all server changes between two timestamps.
getChangesByModSeq()  : array<string|int, mixed>
Return all changes occuring between the specified modification sequences.
getClient()  : array<string|int, mixed>
Returns a contact from the client source.
getClients()  : array<string|int, mixed>
Returns mulitple contacts from the client source.
getClientSource()  : string
Returns the client source name.
getContact()  : array<string|int, mixed>
Retrieves a contact.
getContacts()  : array<string|int, mixed>
Retrieves a set of contacts from a single source.
getDefaultShare()  : string
Retrieve the UID for the current user's default Turba share.
getField()  : array<string|int, mixed>
Returns a field value.
getGalUid()  : string|bool
Retrieve the UID for the Global Address List source.
getGroupMembers()  : array<string|int, mixed>
Returns a list of all members belonging to a contact group.
getGroupMemberships()  : array<string|int, mixed>
Returns all contact groups that the specified user is a member of.
getGroupObject()  : array<string|int, mixed>
Returns a contact group hash.
getGroupObjects()  : array<string|int, mixed>
Returns all contact groups.
getHighestModSeq()  : int
Return the largest modification sequence from the history backend.
getOwnContactObject()  : array<string|int, mixed>
Helper function to return the user's own contact object
getSourcesConfig()  : array<string|int, mixed>
Obtain an array of $cfgSource entries matching the filter criteria.
hasComments()  : bool
Does this API allow comments?
import()  : string
Import a contact represented in the specified contentType.
listBy()  : array<string|int, mixed>
Returns an array of UIDs for contacts that have had a given action since a certain time.
listShares()  : array<string|int, mixed>
Lists all shares the current user has access to.
listTagInfo()  : array<string|int, mixed>
Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag.
listTimeObjectCategories()  : array<string|int, mixed>
Retrieves a list of available time objects categories.
listTimeObjects()  : array<string|int, mixed>
Lists birthdays and/or anniversaries as time objects.
listUids()  : array<string|int, mixed>
Returns an array of UIDs for all contacts that the current user is authorized to see.
listUserGroupObjects()  : array<string|int, mixed>
GroupObject API - Lists all turba lists for the current user that can be treated as Horde_Group objects.
ownContact()  : array<string|int, mixed>
Export the user's own contact as a hash.
ownVCard()  : string
Exports the user's own contact as a vCard string.
path_delete()  : string
Deletes a file from the Turba tree.
replace()  : bool
Replaces the contact identified by UID with the content represented in the specified contentType.
search()  : mixed
Returns a contact search result.
searchClients()  : array<string|int, mixed>
Search for clients.
searchTags()  : array<string|int, mixed>
SearchTags API: Returns an application-agnostic array (useful for when doing a tag search across multiple applications)
sources()  : array<string|int, mixed>
Returns a list of available sources.
updateAddressbook()  : mixed
Update an existing addressbook's name or description.
updateClient()  : bool
Updates client data.
_encodeContent()  : mixed
_getContactImageUrl()  : mixed
_getGroupObject()  : mixed
_getSource()  : mixed
_getSources()  : mixed
_modified()  : mixed

Properties

Links.

protected array<string|int, mixed> $_links = array('show' => '%application%/contact.php?source=|source|&key=|key|&uid=|uid|', 'smartmobile_browse' => '%application%/smartmobile.php#browse')

$_noPerms

The listing of API calls that do not require permissions checking.

protected array<string|int, mixed> $_noPerms = array('getClientSource', 'getClient', 'getClients', 'searchClients')

Methods

addAddressbook()

Creates a new addressbook.

public addAddressbook(string $name[, array<string|int, mixed> $params = array() ]) : string
Parameters
$name : string

The display name for the addressbook.

$params : array<string|int, mixed> = 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
Tags
since
4.2.0
Return values
string

The new addressbook's id (share name).

addClient()

Adds a client to the client source.

public addClient([array<string|int, mixed> $attributes = array() ]) : bool
Parameters
$attributes : array<string|int, mixed> = array()

Array containing the client attributes.

Return values
bool

addField()

Sets the value of the specified attribute of a contact

public addField([string|array<string|int, mixed> $address = '' ][, string $name = '' ][, string $field = '' ][, string $value = '' ][, string $source = '' ]) : mixed
Parameters
$address : string|array<string|int, mixed> = ''

Contact email address(es).

$name : string = ''

Contact name.

$field : string = ''

Field to update.

$value : string = ''

Field value to set.

$source : string = ''

Contact source.

Tags
throws
Turba_Exception
Return values
mixed

addGroup()

Adds a group (and its members) to the source provided.

public addGroup(string $name, array<string|int, mixed> $members[, array<string|int, mixed> $opts = array() ]) : array<string|int, mixed>
Parameters
$name : string

Group name.

$members : array<string|int, mixed>

An array of members to add to the group. Format is the same as the 'array' argument to the import() API function.

$opts : array<string|int, mixed> = array()

Additional options:

  - attr: (array) Additional attributes to add to group.
  - source: (string) Source to import contacts to.
Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

An array with the following keys:

  - added: (integer) The number of addresses added to the group.
  - uid: (string) The uid of the group object.

browse()

Browses through Turba's object tree.

public browse([string $path = '' ][, array<string|int, mixed> $properties = array('name', 'icon', 'browseable') ]) : array<string|int, mixed>
Parameters
$path : string = ''

The path of the tree to browse.

$properties : array<string|int, mixed> = array('name', 'icon', 'browseable')

The item properties to return. Defaults to 'name', 'icon', and 'browseable'.

Tags
throws
Turba_Exception
throws
Horde_Exception_NotFound
Return values
array<string|int, mixed>

Content of the specified path.

clientFields()

Returns the available client fields.

public clientFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array describing the fields.

commentCallback()

Callback for comment API.

public commentCallback(int $id) : mixed
Parameters
$id : int

Internal data identifier.

Return values
mixed

Name of object on success, false on failure.

delete()

Deletes a contact identified by UID.

public delete(string|array<string|int, mixed> $uid[, string|array<string|int, mixed> $sources = null ]) : bool
Parameters
$uid : string|array<string|int, mixed>

Identify the contact to delete, either a single UID or an array.

$sources : string|array<string|int, mixed> = null

The source(s) from which the contact will be deleted.

Tags
throws
Turba_Exception
Return values
bool

Success or failure.

deleteAddressbook()

Delete the specified addressbook.

public deleteAddressbook(string $id) : mixed
Parameters
$id : string

The addressbook id.

Tags
since
4.2.0
Return values
mixed

deleteClient()

Deletes a client

public deleteClient([string $objectId = '' ]) : bool
Parameters
$objectId : string = ''

The unique id of the client

Return values
bool

deleteField()

Deletes a field value.

public deleteField([string $address = '' ][, string $field = '' ][, array<string|int, mixed> $sources = array() ]) : mixed
Parameters
$address : string = ''

Contact email address.

$field : string = ''

Field to delete value for.

$sources : array<string|int, mixed> = array()

Sources to delete value from.

Tags
throws
Turba_Exception
Return values
mixed

export()

Export a contact, identified by UID, in the requested contentType.

public export(string $uid, mixed $contentType[, string|array<string|int, mixed> $sources = null ][, array<string|int, mixed> $fields = null ][, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$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<string|int, mixed> = null

The source(s) from which the contact will be exported.

$fields : array<string|int, mixed> = null

Hash of field names and Horde_SyncMl_Property properties with the requested fields.

$options : array<string|int, mixed> = 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).
Tags
throws
Turba_Exception
Return values
mixed

The requested data.

fields()

Returns a list of fields avaiable in a source.

public fields([string $source = null ]) : array<string|int, mixed>
Parameters
$source : string = null

The source name.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

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.

getActionTimestamp()

Returns the timestamp of an operation for a given UID and action.

public getActionTimestamp(string $uid, string $action[, string|array<string|int, mixed> $sources = null ][, bool $modSeq = false ]) : int
Parameters
$uid : string

The UID to look for.

$action : string

The action to check for - add, modify, or delete.

$sources : string|array<string|int, mixed> = null

The source(s) for which to retrieve the history.

$modSeq : bool = false

Request a modification sequence instead of timestamp. @since 4.1.1

Tags
throws
Turba_Exception
Return values
int

The timestamp for this action.

getAllAttributeValues()

Retrieves a list of all possible values of a field in specified source(s).

public getAllAttributeValues([string $field = '' ][, array<string|int, mixed> $sources = array() ]) : array<string|int, mixed>
Parameters
$field : string = ''

Field name to check.

$sources : array<string|int, mixed> = array()

Array containing the sources to look in.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

An array of fields and possible values.

getChanges()

Method for obtaining all server changes between two timestamps.

public getChanges(int $start, int $end[, bool $isModSeq = false ][, string|array<string|int, mixed> $sources = null ]) : array<string|int, mixed>

Essentially a wrapper around listBy(), but returns an array containing all adds, edits, and deletions.

Parameters
$start : int

The starting timestamp

$end : int

The ending timestamp.

$isModSeq : bool = false

If true, $start and $end are modification sequences and not timestamps. @since 4.1.1

$sources : string|array<string|int, mixed> = null

The sources to check. @since 4.2.0

Return values
array<string|int, mixed>

A hash with 'add', 'modify' and 'delete' arrays.

getChangesByModSeq()

Return all changes occuring between the specified modification sequences.

public getChangesByModSeq(int $start, int $end[, string|array<string|int, mixed> $sources = null ]) : array<string|int, mixed>
Parameters
$start : int

The starting modseq.

$end : int

The ending modseq.

$sources : string|array<string|int, mixed> = null

The sources to check. @since 4.2.0

Tags
since
4.1.1
Return values
array<string|int, mixed>

The changes @see getChanges()

getClient()

Returns a contact from the client source.

public getClient([string $objectId = '' ]) : array<string|int, mixed>
Parameters
$objectId : string = ''

Client unique ID.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

Array of client data.

getClients()

Returns mulitple contacts from the client source.

public getClients([array<string|int, mixed> $objectIds = array() ]) : array<string|int, mixed>
Parameters
$objectIds : array<string|int, mixed> = array()

client unique ids.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

An array of clients data.

getClientSource()

Returns the client source name.

public getClientSource() : string
Return values
string

The name of the source to use with the clients api.

getContact()

Retrieves a contact.

public getContact([string $source = null ][, string $objectId = '' ]) : array<string|int, mixed>
Parameters
$source : string = null

The source name where the contact is stored

$objectId : string = ''

The unique id of the contact to retrieve

Tags
throws
Turba_Exception
throws
Horde_Exception_NotFound
Return values
array<string|int, mixed>

The retrieved contact.

getContacts()

Retrieves a set of contacts from a single source.

public getContacts([string $source = '' ][, array<string|int, mixed> $objectIds = array() ]) : array<string|int, mixed>
Parameters
$source : string = ''

The source name where the contact is stored

$objectIds : array<string|int, mixed> = array()

The unique ids of the contact to retrieve.

Tags
throws
Turba_Exception
throws
Horde_Exception_NotFound
Return values
array<string|int, mixed>

The retrieved contact.

getDefaultShare()

Retrieve the UID for the current user's default Turba share.

public getDefaultShare() : string
Return values
string

UID.

getField()

Returns a field value.

public getField([string $address = '' ][, string $field = '' ][, array<string|int, mixed> $sources = array() ][, bool $strict = false ][, bool $multiple = false ]) : array<string|int, mixed>
Parameters
$address : string = ''

Contact email address.

$field : string = ''

Field to get.

$sources : array<string|int, mixed> = array()

Sources to check.

$strict : bool = false

Match the email address strictly.

$multiple : bool = false

Return more than one entry if found and true, return an error if this is false.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

An array of field value(s).

getGalUid()

Retrieve the UID for the Global Address List source.

public getGalUid() : string|bool
Return values
string|bool

The UID or false if none configured.

getGroupMembers()

Returns a list of all members belonging to a contact group.

public getGroupMembers(string $gid[, bool $subGroups = false ]) : array<string|int, mixed>
Parameters
$gid : string

The group identifier

$subGroups : bool = false

Also include members of any subgroups?

Tags
throws
Horde_Exception
Return values
array<string|int, mixed>

An array of group members (identified by email address).

getGroupMemberships()

Returns all contact groups that the specified user is a member of.

public getGroupMemberships(string $user[, bool $parentGroups = false ]) : array<string|int, mixed>
Parameters
$user : string

The user.

$parentGroups : bool = false

Include user as a member of the any parent group as well.

Tags
throws
Horde_Exception
Return values
array<string|int, mixed>

An array of group identifiers that the specified user is a member of.

getGroupObject()

Returns a contact group hash.

public getGroupObject(string $gid) : array<string|int, mixed>
Parameters
$gid : string

The group identifier.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

A hash defining the group.

getGroupObjects()

Returns all contact groups.

public getGroupObjects() : array<string|int, mixed>
Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

A list of group hashes.

getHighestModSeq()

Return the largest modification sequence from the history backend.

public getHighestModSeq([string $id = null ]) : int
Parameters
$id : string = null

Addressbook id to return highest MODSEQ for. If null, the highest MODSEQ across all addressbooks is returned. @since 4.2.0

Tags
since
4.1.1
Return values
int

The modseq.

getOwnContactObject()

Helper function to return the user's own contact object

public getOwnContactObject() : array<string|int, mixed>
Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

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.

getSourcesConfig()

Obtain an array of $cfgSource entries matching the filter criteria.

public getSourcesConfig([type $filter = array() ]) : array<string|int, mixed>
Parameters
$filter : type = array()

A single key -> value hash to filter the sources.

Return values
array<string|int, mixed>

hasComments()

Does this API allow comments?

public hasComments() : bool
Return values
bool

True if API allows comments.

import()

Import a contact represented in the specified contentType.

public import(string $content[, string $contentType = 'array' ][, string $source = null ][, array<string|int, mixed> $options = array() ]) : string
Parameters
$content : string

The content of the contact.

$contentType : string = 'array'

What format is the data in? Currently supports array, text/directory, text/vcard, text/x-vcard, and activesync.

$source : string = null

The source into which the contact will be imported.

$options : array<string|int, mixed> = 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
Tags
throws
Turba_Exception
throws
Turba_Exception_ObjectExists
Return values
string

The new UID.

listBy()

Returns an array of UIDs for contacts that have had a given action since a certain time.

public listBy(string $action, int $timestamp[, string|array<string|int, mixed> $sources = null ][, int $end = null ][, bool $isModSeq = false ]) : array<string|int, mixed>
Parameters
$action : string

The action to check for - add, modify, or delete.

$timestamp : int

The time to start the search.

$sources : string|array<string|int, mixed> = null

The source(s) for which to retrieve the history.

$end : int = null

The optional ending timestamp.

$isModSeq : bool = false

If true, $timestamp and $end are modification sequences and not timestamps. @since 4.1.1

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

An array of UIDs matching the action and time criteria.

listShares()

Lists all shares the current user has access to.

public listShares([int $perms = Horde_Perms::READ ]) : array<string|int, mixed>
Parameters
$perms : int = Horde_Perms::READ
Return values
array<string|int, mixed>

of Turba_Share objects.

listTagInfo()

Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag.

public listTagInfo([array<string|int, mixed> $tags = null ][, mixed $user = null ]) : array<string|int, mixed>
Parameters
$tags : array<string|int, mixed> = null

An optional array of tag_ids. If omitted, all tags will be included.

$user : mixed = null
Return values
array<string|int, mixed>

An array containing tag_name, and total

listTimeObjectCategories()

Retrieves a list of available time objects categories.

public listTimeObjectCategories() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array of all configured time object categories.

listTimeObjects()

Lists birthdays and/or anniversaries as time objects.

public listTimeObjects(array<string|int, mixed> $time_categories, mixed $start, mixed $end) : array<string|int, mixed>
Parameters
$time_categories : array<string|int, mixed>

The time categories (from listTimeObjectCategories) to list.

$start : mixed

The start date of the period.

$end : mixed

The end date of the period.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

An array of timeObject results.

listUids()

Returns an array of UIDs for all contacts that the current user is authorized to see.

public listUids([string|array<string|int, mixed> $sources = null ]) : array<string|int, mixed>
Parameters
$sources : string|array<string|int, mixed> = null

The name(s) of the source(s) to return contacts of. If empty, the current user's sync sources or default source are used.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

An array of UIDs for all contacts the user can access.

listUserGroupObjects()

GroupObject API - Lists all turba lists for the current user that can be treated as Horde_Group objects.

public listUserGroupObjects() : array<string|int, mixed>
Tags
throws
Horde_Exception
Return values
array<string|int, mixed>

A hash of all visible groups in the form of group_id => group_name

ownContact()

Export the user's own contact as a hash.

public ownContact() : array<string|int, mixed>
Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

The contact hash.

ownVCard()

Exports the user's own contact as a vCard string.

public ownVCard() : string
Tags
throws
Turba_Exception
Return values
string

The requested vCard data.

path_delete()

Deletes a file from the Turba tree.

public path_delete(string $path) : string
Parameters
$path : string

The path to the file.

Tags
throws
Turba_Exception
Return values
string

The event's UID.

replace()

Replaces the contact identified by UID with the content represented in the specified contentType.

public replace(string $uid, mixed $content, string $contentType[, string|array<string|int, mixed> $sources = null ]) : bool
Parameters
$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<string|int, mixed> = null

The source(s) where the contact will be replaced.

Tags
throws
Turba_Exception
Return values
bool

Success or failure.

Returns a contact search result.

public search([mixed $names = null ][, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
$names : mixed = null

The search filter values.

$opts : array<string|int, mixed> = 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. Note that the __key field will always be returned. 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
Tags
throws
Turba_Exception
Return values
mixed

Either a hash containing the search results or a Rfc822 List object (if 'rfc822Return' is true).

searchClients()

Search for clients.

public searchClients([array<string|int, mixed> $names = array() ][, array<string|int, mixed> $fields = array() ][, bool $matchBegin = false ]) : array<string|int, mixed>
Parameters
$names : array<string|int, mixed> = array()

The search filter values.

$fields : array<string|int, mixed> = array()

The fields to search in.

$matchBegin : bool = false

Match word boundaries only.

Tags
throws
Turba_Exception
Return values
array<string|int, mixed>

A hash containing the search results.

searchTags()

SearchTags API: Returns an application-agnostic array (useful for when doing a tag search across multiple applications)

public searchTags(array<string|int, mixed> $names[, int $max = 10 ], int $from[, string $resource_type = '' ][, string $user = null ][, bool $raw = false ]) : array<string|int, mixed>

The 'raw' results array can be returned instead by setting $raw = true.

Parameters
$names : array<string|int, mixed>

An array of tag_names to search for.

$max : int = 10

The maximum number of resources to return.

$from : int

The number of the resource to start with.

$resource_type : string = ''

The resource type [bookmark, '']

$user : string = null

Restrict results to resources owned by $user.

$raw : bool = false

Return the raw data?

Return values
array<string|int, mixed>

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.

sources()

Returns a list of available sources.

public sources([bool $writeable = false ][, bool $sync_only = false ]) : array<string|int, mixed>
Parameters
$writeable : bool = false

If true, limits to writeable sources.

$sync_only : bool = false

Only include synchable address books.

Return values
array<string|int, mixed>

An array of the available sources. Keys are source IDs, values are source titles.

updateAddressbook()

Update an existing addressbook's name or description.

public updateAddressbook(string $id, array<string|int, mixed> $info) : mixed
Parameters
$id : string

The addressbook id.

$info : array<string|int, mixed>

The info to change:

  • name: The addressbook's display name.
  • desc: The addressbook's description.
Tags
since
4.2.0
Return values
mixed

updateClient()

Updates client data.

public updateClient([string $objectId = '' ][, array<string|int, mixed> $attributes = array() ]) : bool
Parameters
$objectId : string = ''

The unique id of the client.

$attributes : array<string|int, mixed> = array()

An array of client attributes.

Return values
bool

_encodeContent()

protected _encodeContent(mixed $content) : mixed
Parameters
$content : mixed
Return values
mixed

_getContactImageUrl()

protected _getContactImageUrl(mixed $obj) : mixed
Parameters
$obj : mixed
Return values
mixed

_getGroupObject()

protected _getGroupObject(mixed $source, mixed $key) : mixed
Parameters
$source : mixed
$key : mixed
Return values
mixed

_getSource()

protected _getSource(mixed $source) : mixed
Parameters
$source : mixed
Return values
mixed

_getSources()

protected _getSources(mixed $sources[, mixed $synchronize = false ][, mixed $end = false ]) : mixed
Parameters
$sources : mixed
$synchronize : mixed = false
$end : mixed = false
Tags
throws
Turba_Exception
Return values
mixed

_modified()

protected _modified(mixed $uid, mixed $sources) : mixed
Parameters
$uid : mixed
$sources : mixed
Return values
mixed

Search results