Class Turba_Driver_share

Description

The Turba_Driver:: class provides a common abstracted interface to the various directory search drivers. It includes functions for searching, adding, removing, and modifying directory entries.

$Horde: turba/lib/Driver/share.php,v 1.11.2.7 2009/10/07 16:16:38 mrubinsk Exp $

Located in /lib/Driver/share.php (line 13)

Turba_Driver
   |
   --Turba_Driver_share
Variable Summary
 Turba_Driver $_driver
 Horde_Share $_share
Method Summary
 void getName ()
 boolean hasCapability (string $capability)
 boolean hasPermission (integer $perm)
 void removeUserData ( $user)
 void _add ( $attributes, [ $blob_fields = array()])
 void _canAdd ()
 void _delete ( $object_key,  $object_id)
 boolean _deleteAll ([ $sourceName = null])
 string _getContactOwner ()
 void _getTimeObjectTurbaList ( $start,  $end,  $field)
 void _init ()
 void _makeKey ( $attributes)
 array _read (string $key, mixed $ids, string $owner, array $fields, [ $blob_fields = array()])
 string _save ( $object_key,  $object_id,  $attributes, [ $blob_fields = array()])
 array _search (array $criteria, array $fields)
Variables
Methods
getName (line 59)

Return the name of this address book.

void getName ()

Redefinition of:
Turba_Driver::getName()
Return the name of this address book.
hasCapability (line 36)

Checks if this backend has a certain capability.

  • return: Supported or not.
boolean hasCapability (string $capability)
  • string $capability: The capability to check for.

Redefinition of:
Turba_Driver::hasCapability()
Checks if this backend has a certain capability.
hasPermission (line 49)

Checks if the current user has the requested permissions on this address book.

  • return: True if the user has permission, otherwise false.
boolean hasPermission (integer $perm)
  • integer $perm: The permission to check for.

Redefinition of:
Turba_Driver::hasPermission()
Checks if the current user has the requested permissions on this address book.
removeUserData (line 175)

Stub for removing all data for a specific user - to be overridden by child class.

void removeUserData ( $user)
  • $user

Redefinition of:
Turba_Driver::removeUserData()
Remove all entries owned by the specified user.
_add (line 127)

Adds the specified object to the SQL database.

void _add ( $attributes, [ $blob_fields = array()])
  • $attributes
  • $blob_fields

Redefinition of:
Turba_Driver::_add()
Adds the specified contact to the SQL database.
_canAdd (line 135)
  • see: _canAdd()
void _canAdd ()

Redefinition of:
Turba_Driver::_canAdd()
_delete (line 143)

Deletes the specified object from the SQL database.

void _delete ( $object_key,  $object_id)
  • $object_key
  • $object_id

Redefinition of:
Turba_Driver::_delete()
Deletes the specified contact from the SQL database.
_deleteAll (line 153)

Deletes all contacts from a specific address book.

  • return: True if the operation worked.
boolean _deleteAll ([ $sourceName = null])
  • $sourceName
_getContactOwner (line 71)

Return the owner to use when searching or creating contacts in this address book.

string _getContactOwner ()

Redefinition of:
Turba_Driver::_getContactOwner()
_getTimeObjectTurbaList (line 188)
void _getTimeObjectTurbaList ( $start,  $end,  $field)
  • $start
  • $end
  • $field

Redefinition of:
Turba_Driver::_getTimeObjectTurbaList()
Default implementation for obtaining a Turba_List to get TimeObjects out of.
_init (line 83)

Initialize

void _init ()

Redefinition of:
Turba_Driver::_init()
Initialize the driver.
_makeKey (line 183)
void _makeKey ( $attributes)
  • $attributes

Redefinition of:
Turba_Driver::_makeKey()
Creates an object key for a new object.
_read (line 119)

Reads the given data from the address book and returns the results.

  • return: Hash containing the search results.
array _read (string $key, mixed $ids, string $owner, array $fields, [ $blob_fields = array()])
  • string $key: The primary key field to use.
  • mixed $ids: The ids of the contacts to load.
  • string $owner: Only return contacts owned by this user.
  • array $fields: List of fields to return.
  • $blob_fields

Redefinition of:
Turba_Driver::_read()
Reads the given data from the address book and returns the results.
_save (line 166)

Saves the specified object in the SQL database.

  • return: The object id, possibly updated.
string _save ( $object_key,  $object_id,  $attributes, [ $blob_fields = array()])
  • $object_key
  • $object_id
  • $attributes
  • $blob_fields

Redefinition of:
Turba_Driver::_save()
Saves the specified object in the SQL database.
_search (line 103)

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.

  • return: Hash containing the search results.
array _search (array $criteria, array $fields)
  • array $criteria: Array containing the search criteria.
  • array $fields: List of fields to return.

Redefinition of:
Turba_Driver::_search()
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.

Inherited Methods

Inherited From Turba_Driver

 Turba_Driver::Turba_Driver()
 Turba_Driver::add()
 Turba_Driver::canAdd()
 Turba_Driver::checkDefaultShare()
 Turba_Driver::count()
 Turba_Driver::createShare()
 Turba_Driver::delete()
 Turba_Driver::deleteAll()
 Turba_Driver::generateUID()
 Turba_Driver::getBlobs()
 Turba_Driver::getContactOwner()
 Turba_Driver::getCountry()
 Turba_Driver::getCriteria()
 Turba_Driver::getFields()
 Turba_Driver::getName()
 Turba_Driver::getObject()
 Turba_Driver::getObjects()
 Turba_Driver::getParams()
 Turba_Driver::hasCapability()
 Turba_Driver::hasPermission()
 Turba_Driver::listTimeObjects()
 Turba_Driver::makeSearch()
 Turba_Driver::removeUserData()
 Turba_Driver::save()
 Turba_Driver::search()
 Turba_Driver::singleton()
 Turba_Driver::toDriver()
 Turba_Driver::toDriverKeys()
 Turba_Driver::toHash()
 Turba_Driver::toTurbaKeys()
 Turba_Driver::tovCard()
 Turba_Driver::_add()
 Turba_Driver::_canAdd()
 Turba_Driver::_delete()
 Turba_Driver::_getContactOwner()
 Turba_Driver::_getTimeObjectTurbaList()
 Turba_Driver::_getTimeObjectTurbaListFallback()
 Turba_Driver::_init()
 Turba_Driver::_makeKey()
 Turba_Driver::_read()
 Turba_Driver::_save()
 Turba_Driver::_search()
 Turba_Driver::_toTurbaObjects()

Documentation generated on Sun, 30 Jan 2011 05:39:26 +0000 by phpDocumentor 1.4.3