PHP 클래스 Turba_Driver_Share, horde

Copyright 2009-2016 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.
저자: Chuck Hagenbuch ([email protected])
저자: Jon Parise ([email protected])
저자: Michael J. Rubinsky ([email protected])
상속: extends Turba_Driver
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_driver Turba_Driver Underlying driver object for this source.
$_share Horde_Share Horde_Share object for this source.

공개 메소드들

메소드 설명
__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.

보호된 메소드들

메소드 설명
_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.

메소드 상세

__call() 공개 메소드

Proxy to decorated base driver.
public __call ( string $method, array $args ) : mixed
$method string Method name.
$args array Method arguments.
리턴 mixed Method result.

__construct() 공개 메소드

Constructor
public __construct ( string $name = '', array $params = [] ) : Turba_Driver
$name string The source name
$params array The parameter array describing the source
리턴 Turba_Driver

_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() 보호된 메소드

Returns ability of the backend to add new contacts.
protected _canAdd ( ) : boolean
리턴 boolean Can backend add?

_delete() 보호된 메소드

Deletes the specified contact from the addressbook.
protected _delete ( string $object_key, string $object_id )
$object_key string TODO
$object_id string TODO

_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

_getContactOwner() 보호된 메소드

Return the owner to use when searching or creating contacts in this address book.
protected _getContactOwner ( ) : string
리턴 string TODO

_makeKey() 보호된 메소드

Creates 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.

_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.

getName() 공개 메소드

Return the name of this address book.
public getName ( )

getTimeObjectTurbaList() 공개 메소드

Obtains a Turba_List to get TimeObjects out of.
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).
리턴 Turba_List A list of objects.

hasCapability() 공개 메소드

Checks if this backend has a certain capability.
public hasCapability ( string $capability ) : boolean
$capability string The capability to check for.
리턴 boolean Supported or not.

hasPermission() 공개 메소드

Checks if the current user has the requested permissions on this address book.
public hasPermission ( integer $perm ) : boolean
$perm integer The permission to check for.
리턴 boolean True if the user has permission, otherwise false.

removeUserData() 공개 메소드

Remove all data for a specific user.
public removeUserData ( string $user )
$user string The user to remove all data for.

searchDuplicates() 공개 메소드

Duplicates are determined by comparing email and name or last name and first name values.
public searchDuplicates ( ) : array
리턴 array A hash with the following format: array('name' => array('John Doe' => Turba_List, ...), ...)

setDefaultShare() 공개 메소드

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

synchronize() 공개 메소드

Synchronize, if needed.
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.

프로퍼티 상세

$_driver 보호되어 있는 프로퍼티

Underlying driver object for this source.
protected Turba_Driver $_driver
리턴 Turba_Driver

$_share 보호되어 있는 프로퍼티

Horde_Share object for this source.
protected Horde_Share $_share
리턴 Horde_Share