PHP Class Turba_Driver_Kolab, horde

Copyright 2004-2016 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (ASL). If you did not receive this file, see http://www.horde.org/licenses/apache.
Author: Thomas Jarosch ([email protected])
Author: Gunnar Wrobel ([email protected])
Author: Stuart Binge ([email protected])
Inheritance: extends Turba_Driver
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_capabilities array What can this backend do?
$_connected boolean Indicates if the driver has been connected to a specific addressbook or not.
$_contacts_cache array The cached contacts.
$_data Horde_Kolab_Storage_Data The current addressbook.
$_kolab Horde_Kolab_Storage The Kolab_Storage backend.
$_listData Horde_Kolab_Storage_Data The current addressbook, serving groups.
$_objectOptions array Any additional options passed to Turba_Object constructors.
$_share Horde_Share_Object The current addressbook represented as share.

Méthodes publiques

Méthode Description
__construct ( $name = '', $params = [] ) Attempts to open a Kolab Groupware folder.
checkDefaultShare ( Horde_Share_Object $share, array $srcconfig ) : boolean Check if the passed in share is the default share for this source.
connect ( ) Connect to the Kolab backend.
createShare ( string $share_name, array $params ) : Horde_Share Creates a new Horde_Share for this source type.
setDefaultShare ( string $share ) Runs any actions after setting a new default notepad.
synchronize ( mixed $token = false ) Synchronize with the Kolab backend.
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.

Méthodes protégées

Méthode Description
_add ( array $attributes, array $blob_fields = [], array $date_fields = [] ) Adds the specified contact to the addressbook.
_canAdd ( )
_convertMembers ( &$attributes ) TODO
_createData ( string $type ) : Horde_Kolab_Storage_Data Returns a new Kolab data handler for the current address book.
_delete ( $object_key, $object_id ) Removes the specified object from the Kolab message store.
_deleteAll ( string $sourceName = null ) : array Deletes all contacts from a specific address book.
_doSearch ( array $criteria, $glue ) : array Applies the filter criteria to a list of entries
_generateUid ( ) : string Create an object key for a new object.
_getAND ( array $ids ) : array Returns only those names that are duplicated in $ids
_getData ( ) : Horde_Kolab_Storage_Data Returns the Kolab data handler for contacts in the current address book.
_getListData ( ) : Horde_Kolab_Storage_Data Returns the Kolab data handler for distribution lists in the current address book.
_makeKey ( array $attributes ) : string Create 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.
_removeDuplicated ( array $ids ) : array Returns an array with all duplicate names removed.
_save ( Turba_Object $object ) : string Saves the specified object in the SQL database.
_search ( array $criteria, array $fields, array $blobFields = [], $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.
_selectEntries ( $test ) : array Applies one filter criterium to a list of entries
_store ( $attributes, $object_id = null ) : string Stores an object in the Kolab message store.

Method Details

__construct() public méthode

Attempts to open a Kolab Groupware folder.
public __construct ( $name = '', $params = [] )

_add() protected méthode

Adds the specified contact to the addressbook.
protected _add ( array $attributes, array $blob_fields = [], array $date_fields = [] )
$attributes array The attribute values of the contact.
$blob_fields array Fields that represent binary data.
$date_fields array Fields that represent dates. @since 4.2.0

_canAdd() protected méthode

protected _canAdd ( )

_convertMembers() protected méthode

TODO
protected _convertMembers ( &$attributes )

_createData() protected méthode

Returns a new Kolab data handler for the current address book.
protected _createData ( string $type ) : Horde_Kolab_Storage_Data
$type string An object type, either 'contact' or 'distribution-list'.
Résultat Horde_Kolab_Storage_Data A data handler.

_delete() protected méthode

Removes the specified object from the Kolab message store.
protected _delete ( $object_key, $object_id )

_deleteAll() protected méthode

Deletes all contacts from a specific address book.
protected _deleteAll ( string $sourceName = null ) : array
$sourceName string The source to remove all contacts from.
Résultat array An array of UIDs

_doSearch() protected méthode

Applies the filter criteria to a list of entries
protected _doSearch ( array $criteria, $glue ) : array
$criteria array Array containing the search criteria.
Résultat array Array containing the ids of the selected entries.

_generateUid() protected méthode

Create an object key for a new object.
protected _generateUid ( ) : string
Résultat string A unique ID for the new object.

_getAND() protected méthode

Returns only those names that are duplicated in $ids
protected _getAND ( array $ids ) : array
$ids array A nested array of arrays containing names
Résultat array Array containing the 'AND' of all arrays in $ids

_getData() protected méthode

Returns the Kolab data handler for contacts in the current address book.
protected _getData ( ) : Horde_Kolab_Storage_Data
Résultat Horde_Kolab_Storage_Data The data handler.

_getListData() protected méthode

Returns the Kolab data handler for distribution lists in the current address book.
protected _getListData ( ) : Horde_Kolab_Storage_Data
Résultat Horde_Kolab_Storage_Data The data handler.

_makeKey() protected méthode

Create an object key for a new object.
protected _makeKey ( array $attributes ) : string
$attributes array The attributes (in driver keys) of the object being added.
Résultat string A unique ID for the new object.

_makeUid() protected méthode

Creates an object UID for a new object.
protected _makeUid ( ) : string
Résultat string A unique ID for the new object.

_read() protected méthode

Reads the given data from the address book and returns the results.
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
Résultat array Hash containing the search results.

_removeDuplicated() protected méthode

Returns an array with all duplicate names removed.
protected _removeDuplicated ( array $ids ) : array
$ids array Nested array of arrays containing names.
Résultat array Array containg the 'OR' of all arrays in $ids.

_save() protected méthode

Saves the specified object in the SQL database.
protected _save ( Turba_Object $object ) : string
$object Turba_Object The object to save
Résultat string The object id, possibly updated.

_selectEntries() protected méthode

Applies one filter criterium to a list of entries
protected _selectEntries ( $test ) : array
$test Test criterium
Résultat array Array containing the ids of the selected entries

_store() protected méthode

TODO
protected _store ( $attributes, $object_id = null ) : string
Résultat string The object id, possibly updated.

checkDefaultShare() public méthode

Check if the passed in share is the default share for this source.
public checkDefaultShare ( Horde_Share_Object $share, array $srcconfig ) : boolean
$share Horde_Share_Object The share object.
$srcconfig array The cfgSource entry for the share.
Résultat boolean TODO

connect() public méthode

Connect to the Kolab backend.
public connect ( )

createShare() public méthode

Creates a new Horde_Share for this source type.
public createShare ( string $share_name, array $params ) : Horde_Share
$share_name string The share name
$params array The params for the share.
Résultat Horde_Share The share object.

setDefaultShare() public méthode

Runs any actions after setting a new default notepad.
public setDefaultShare ( string $share )
$share string The default share ID.

synchronize() public méthode

Synchronize with the Kolab backend.
public synchronize ( mixed $token = false )
$token mixed A value indicating the last synchronization point, if available.

toDriverKeys() public méthode

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.
public toDriverKeys ( array $hash ) : array
$hash array Hash using Turba keys.
Résultat array Translated version of $hash.

toTurbaKeys() public méthode

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.
public toTurbaKeys ( array $entry ) : array
$entry array A hash using driver-specific keys.
Résultat array Translated version of $entry.

Property Details

$_capabilities protected_oe property

What can this backend do?
protected array $_capabilities
Résultat array

$_connected protected_oe property

Indicates if the driver has been connected to a specific addressbook or not.
protected bool $_connected
Résultat boolean

$_contacts_cache protected_oe property

The cached contacts.
protected array $_contacts_cache
Résultat array

$_data protected_oe property

The current addressbook.
protected Horde_Kolab_Storage_Data $_data
Résultat Horde_Kolab_Storage_Data

$_kolab protected_oe property

The Kolab_Storage backend.
protected Horde_Kolab_Storage $_kolab
Résultat Horde_Kolab_Storage

$_listData protected_oe property

The current addressbook, serving groups.
protected Horde_Kolab_Storage_Data $_listData
Résultat Horde_Kolab_Storage_Data

$_objectOptions protected_oe property

Any additional options passed to Turba_Object constructors.
protected array $_objectOptions
Résultat array

$_share protected_oe property

The current addressbook represented as share.
protected Horde_Share_Object $_share
Résultat Horde_Share_Object