Property | Type | Description | |
---|---|---|---|
$_capabilities | array | What can this backend do? | |
$_countCache | array | count() cache. | |
$_db | Horde_Db_Adapter | Handle for the current database connection. |
Method | Description | |
---|---|---|
__construct ( string $name = '', array $params = [] ) | Constructor. | |
count ( ) : integer | Returns the number of contacts of the current user in this address book. | |
getTimeObjectTurbaList ( Horde_Date $start, Horde_Date $end, string $field ) : Turba_List | Obtain Turba_List of items to get TimeObjects out of. | |
removeUserData ( string $user ) | Remove all entries owned by the specified user. | |
searchDuplicates ( ) : array | Searches the current address book for duplicate entries. |
Method | Description | |
---|---|---|
_add ( array $attributes, array $blob_fields = [], array $date_fields = [] ) | Adds the specified object to the SQL database. | |
_buildFields ( array $array ) : array | Prepares field lists for searchDuplicates(). | |
_buildJoin ( array $array ) : array | Builds the JOIN conditions for searchDuplicates(). | |
_buildSearchQuery ( string $glue, array $criteria ) : array | Builds a piece of a search query. | |
_buildWhere ( array $array ) : array | Builds the WHERE conditions for searchDuplicates(). | |
_canAdd ( ) | TODO | |
_convertFromDriver ( mixed $value ) : mixed | Converts a value from the driver's charset to the default charset. | |
_convertToDriver ( mixed $value ) : mixed | Converts a value from the default charset to the driver's charset. | |
_delete ( $object_key, $object_id ) | Deletes the specified object from the SQL database. | |
_deleteAll ( string $sourceName = null ) : array | Deletes all contacts from a specific address book. | |
_internalSearch ( array $criteria, array $fields, array $blobFields = [], array $appendWhere = [], boolean $count_only = false ) : mixed | Searches the SQL database with the given criteria and returns a filtered list of results. If the criteria parameter is an empty array, all records will be returned. | |
_makeKey ( array $attributes ) : string | Creates an object key for a new object. | |
_parseRead ( $blobFields, $result, $dateFields = [] ) | ||
_prepareWrite ( $attributes, $blob_fields, $date_fields ) | ||
_read ( string $key, mixed $ids, string $owner, array $fields, array $blobFields = [], array $dateFields = [] ) : array | Reads the given data from the SQL database 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 SQL database with the given criteria and returns a filtered list of results. If the criteria parameter is an empty array, all records will be returned. |
public __construct ( string $name = '', array $params = [] ) | ||
$name | string | The source name |
$params | array | Additional parameters needed:
'db' - (Horde_Db_Adapter) A DB Adapter object. |
protected _buildFields ( array $array ) : array | ||
$array | array | A list of field names. |
return | array | A prepared list of field names. |
protected _buildJoin ( array $array ) : array | ||
$array | array | A list of field names. |
return | array | A list of JOIN conditions. |
protected _buildWhere ( array $array ) : array | ||
$array | array | A list of field names. |
return | array | A list of WHERE conditions. |
protected _convertFromDriver ( mixed $value ) : mixed | ||
$value | mixed | A value to convert. |
return | mixed | The converted value. |
protected _convertToDriver ( mixed $value ) : mixed | ||
$value | mixed | A value to convert. |
return | mixed | The converted value. |
protected _delete ( $object_key, $object_id ) |
protected _deleteAll ( string $sourceName = null ) : array | ||
$sourceName | string | The source to remove all contacts from. |
return | array | An array of UIDs |
protected _internalSearch ( array $criteria, array $fields, array $blobFields = [], array $appendWhere = [], boolean $count_only = false ) : mixed | ||
$criteria | array | Array containing the search criteria. |
$fields | array | List of fields to return. |
$blobFields | array | TODO |
$appendWhere | array | An additional where clause to append. Array should contain 'sql' and 'params' params are used as bind parameters. |
$count_only | boolean | Only return the count of matching entries, not the entries themselves. |
return | mixed | array|integer Hash containing the search results or the count of matching entries. |
protected _prepareWrite ( $attributes, $blob_fields, $date_fields ) |
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 |
return | array | Hash containing the search results. |
protected _search ( array $criteria, array $fields, array $blobFields = [], boolean $count_only = false ) : array | ||
$criteria | array | Array containing the search criteria. |
$fields | array | List of fields to return. |
$blobFields | array | TODO |
$count_only | boolean | Only return the count of matching entries, not the entries themselves. |
return | array | Hash containing the search results. |
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) |
return | Turba_List | Object list. |
public removeUserData ( string $user ) | ||
$user | string | The user's data to remove. |
public searchDuplicates ( ) : array | ||
return | array | A hash with the following format:
array('name' => array('John Doe' => Turba_List, ...), ...)
|
protected array $_capabilities | ||
return | array |