Property | Type | Description | |
---|---|---|---|
$_driver | Turba_Driver | Underlying driver object for this source. | |
$_share | Horde_Share | Horde_Share object for this source. |
Method | Description | |
---|---|---|
__call ( string $method, array $args ) : mixed | Proxy to decorated base driver. | |
__construct ( string $name = '', array $params = [] ) : Turba_Driver | Constructor | |
getName ( ) | Return the name of this address book. | |
getTimeObjectTurbaList ( Horde_Date $start, Horde_Date $end, string $field ) : Turba_List | Obtains a Turba_List to get TimeObjects out of. | |
hasCapability ( string $capability ) : boolean | Checks if this backend has a certain capability. | |
hasPermission ( integer $perm ) : boolean | Checks if the current user has the requested permissions on this address book. | |
removeUserData ( string $user ) | Remove all data for a specific user. | |
searchDuplicates ( ) : array | Searches the current address book for duplicate entries. | |
setDefaultShare ( string $share ) | Runs any actions after setting a new default tasklist. | |
synchronize ( mixed $token = false ) | Synchronize, if needed. | |
toDriverKeys ( array $hash ) : array | Translates the keys of the first hash from the generalized Turba attributes to the driver-specific fields. The translation is based on the contents of $this->map. | |
toTurbaKeys ( array $entry ) : array | Translates a hash from being keyed on driver-specific fields to being keyed on the generalized Turba attributes. The translation is based on the contents of $this->map. |
Method | Description | |
---|---|---|
_add ( array $attributes, array $blob_fields = [], array $date_fields = [] ) | Adds the specified contact to the addressbook. | |
_canAdd ( ) : boolean | Returns ability of the backend to add new contacts. | |
_delete ( string $object_key, string $object_id ) | Deletes the specified contact from the addressbook. | |
_deleteAll ( string $sourceName = null ) : array | Deletes all contacts from a specific address book. | |
_getContactOwner ( ) : string | Return the owner to use when searching or creating contacts in this address book. | |
_makeKey ( array $attributes ) : string | Creates an object key for a new object. | |
_makeUid ( ) : string | Creates an object UID for a new object. | |
_read ( string $key, mixed $ids, string $owner, array $fields, array $blobFields = [], array $dateFields = [] ) : array | Reads the given data from the address book and returns the results. | |
_save ( Turba_Object $object ) : string | Saves the specified object in the SQL database. | |
_search ( array $criteria, array $fields, array $blobFields = [], boolean $count_only = false ) : array | Searches the address book with the given criteria and returns a filtered list of results. If the criteria parameter is an empty array, all records will be returned. |
public __construct ( string $name = '', array $params = [] ) : Turba_Driver | ||
$name | string | The source name |
$params | array | The parameter array describing the source |
return | Turba_Driver |
protected _deleteAll ( string $sourceName = null ) : array | ||
$sourceName | string | The source to remove all contacts from. |
return | array | An array of UIDs |
protected _getContactOwner ( ) : string | ||
return | string | TODO |
protected _read ( string $key, mixed $ids, string $owner, array $fields, array $blobFields = [], array $dateFields = [] ) : array | ||
$key | string | The primary key field to use. |
$ids | mixed | The ids of the contacts to load. |
$owner | string | Only return contacts owned by this user. |
$fields | array | List of fields to return. |
$blobFields | array | Array of fields containing binary data. |
$dateFields | array | Array of fields containing date data. @since 4.2.0 |
return | array | Hash containing the search results. |
protected _search ( array $criteria, array $fields, array $blobFields = [], boolean $count_only = false ) : array | ||
$criteria | array | Array containing the search criteria. |
$fields | array | List of fields to return. |
$blobFields | array | Array of fields containing binary data. |
$count_only | boolean | Only return the count of matching entries, not the entries themselves. |
return | array | Hash containing the search results. |
public getTimeObjectTurbaList ( Horde_Date $start, Horde_Date $end, string $field ) : Turba_List | ||
$start | Horde_Date | The starting date. |
$end | Horde_Date | The ending date. |
$field | string | The address book field containing the timeObject information (birthday, anniversary). |
return | Turba_List | A list of objects. |
public hasCapability ( string $capability ) : boolean | ||
$capability | string | The capability to check for. |
return | boolean | Supported or not. |
public hasPermission ( integer $perm ) : boolean | ||
$perm | integer | The permission to check for. |
return | boolean | True if the user has permission, otherwise false. |
public removeUserData ( string $user ) | ||
$user | string | The user to remove all data for. |
public searchDuplicates ( ) : array | ||
return | array | A hash with the following format:
array('name' => array('John Doe' => Turba_List, ...), ...)
|
public synchronize ( mixed $token = false ) | ||
$token | mixed | A value indicating the last synchronization point, if available. |
public toDriverKeys ( array $hash ) : array | ||
$hash | array | Hash using Turba keys. |
return | array | Translated version of $hash. |
public toTurbaKeys ( array $entry ) : array | ||
$entry | array | A hash using driver-specific keys. |
return | array | Translated version of $entry. |