Class Turba_Driver_Sql
Turba directory driver implementation for the Horde_Db database abstraction
layer.
Copyright 2010-2012 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.
-
Turba_Driver
implements
Countable
-
Turba_Driver_Sql
Methods summary
public
|
#
__construct( string $name = '', array $params = array() )
Constructor.
Parameters
- $name
- The source name
- $params
- Additional parameters needed:
<span class="php-quote">'db'</span> - (Horde_Db_Adapter) A DB Adapter object.
Overrides
|
public
integer
|
#
count( )
Returns the number of contacts of the current user in this address book.
Returns the number of contacts of the current user in this address book.
Returns
integer The number of contacts that the user owns.
Throws
Overrides
|
public
array
|
#
searchDuplicates( )
Searches the current address book for duplicate entries.
Searches the current address book for duplicate entries.
Duplicates are determined by comparing email and name or last name and
first name values.
Returns
array A hash with the following format:
array('name' => array('John Doe' => Turba_List, ...), ...)
Throws
Overrides
|
public
string
|
#
_save( Turba_Object $object )
Saves the specified object in the SQL database.
Saves the specified object in the SQL database.
Parameters
- $object
- The object to save.
Returns
string The object id, possibly updated.
Throws
|
public
|
#
removeUserData( string $user )
Remove all entries owned by the specified user.
Remove all entries owned by the specified user.
Parameters
- $user
- The user's data to remove.
Throws
Horde_Exception_PermissionDenied
Overrides
|
public
Turba_List
|
#
getTimeObjectTurbaList( Horde_Date $start, Horde_Date $end, string $field )
Obtain Turba_List of items to get TimeObjects out of.
Obtain Turba_List of items to get TimeObjects out of.
Parameters
- $start
- The starting date.
- $end
- The ending date.
- $field
- <p>The address book field containing the
timeObject information (birthday, anniversary)</p>
Returns
Throws
Overrides
|
Methods inherited from Turba_Driver
add(),
canAdd(),
checkDefaultShare(),
createShare(),
delete(),
deleteAll(),
fromASContact(),
getBlobs(),
getContactOwner(),
getCriteria(),
getFields(),
getName(),
getObject(),
getObjects(),
getParams(),
hasCapability(),
hasPermission(),
listTimeObjects(),
makeSearch(),
save(),
search(),
setContactOwner(),
setSourceName(),
toASContact(),
toDriver(),
toDriverKeys(),
toHash(),
toTurbaKeys(),
tovCard()
|