PHP Класс 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.
Автор: Thomas Jarosch ([email protected])
Автор: Gunnar Wrobel ([email protected])
Автор: Stuart Binge ([email protected])
Наследование: extends Turba_Driver
Показать файл Открыть проект

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

Свойство Тип Описание
$_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.

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

Метод Описание
__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.

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

Метод Описание
_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.

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

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

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

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

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 _canAdd ( )

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

TODO
protected _convertMembers ( &$attributes )

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

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'.
Результат Horde_Kolab_Storage_Data A data handler.

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

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

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

Deletes all contacts from a specific address book.
protected _deleteAll ( string $sourceName = null ) : array
$sourceName string The source to remove all contacts from.
Результат array An array of UIDs

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

Applies the filter criteria to a list of entries
protected _doSearch ( array $criteria, $glue ) : array
$criteria array Array containing the search criteria.
Результат array Array containing the ids of the selected entries.

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

Create an object key for a new object.
protected _generateUid ( ) : string
Результат string A unique ID for the new object.

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

Returns only those names that are duplicated in $ids
protected _getAND ( array $ids ) : array
$ids array A nested array of arrays containing names
Результат array Array containing the 'AND' of all arrays in $ids

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

Returns the Kolab data handler for contacts in the current address book.
protected _getData ( ) : Horde_Kolab_Storage_Data
Результат Horde_Kolab_Storage_Data The data handler.

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

Returns the Kolab data handler for distribution lists in the current address book.
protected _getListData ( ) : Horde_Kolab_Storage_Data
Результат Horde_Kolab_Storage_Data The data handler.

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

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.
Результат string A unique ID for the new object.

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

Creates an object UID for a new object.
protected _makeUid ( ) : string
Результат string A unique ID for the new object.

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

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
Результат array Hash containing the search results.

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

Returns an array with all duplicate names removed.
protected _removeDuplicated ( array $ids ) : array
$ids array Nested array of arrays containing names.
Результат array Array containg the 'OR' of all arrays in $ids.

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

Saves the specified object in the SQL database.
protected _save ( Turba_Object $object ) : string
$object Turba_Object The object to save
Результат string The object id, possibly updated.

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

Applies one filter criterium to a list of entries
protected _selectEntries ( $test ) : array
$test Test criterium
Результат array Array containing the ids of the selected entries

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

TODO
protected _store ( $attributes, $object_id = null ) : string
Результат string The object id, possibly updated.

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

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.
Результат boolean TODO

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

Connect to the Kolab backend.
public connect ( )

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

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.
Результат Horde_Share The share object.

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

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

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

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

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

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.
Результат array Translated version of $hash.

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

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.
Результат array Translated version of $entry.

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

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

What can this backend do?
protected array $_capabilities
Результат array

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

Indicates if the driver has been connected to a specific addressbook or not.
protected bool $_connected
Результат boolean

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

The cached contacts.
protected array $_contacts_cache
Результат array

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

The current addressbook.
protected Horde_Kolab_Storage_Data $_data
Результат Horde_Kolab_Storage_Data

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

The Kolab_Storage backend.
protected Horde_Kolab_Storage $_kolab
Результат Horde_Kolab_Storage

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

The current addressbook, serving groups.
protected Horde_Kolab_Storage_Data $_listData
Результат Horde_Kolab_Storage_Data

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

Any additional options passed to Turba_Object constructors.
protected array $_objectOptions
Результат array

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

The current addressbook represented as share.
protected Horde_Share_Object $_share
Результат Horde_Share_Object