|
package
|
Framework
|
|
subpackage
|
Addressbook
|
Methods
Object constructor
__construct(object $dbconn, integer $user)
Arguments
$dbconn
objectInstance of the rcube_db class
Count number of available contacts in database
_count() : integer
Response
integerContacts count
Add the given contact records the a certain group
add_to_group( $group_id, $ids) : integer
inherited
Arguments
Response
integerNumber of contacts added
Close connection to source
Called on script shutdown
close()
inherited
Compare search value with contact data
compare_search_value(string $colname, string|array $value, string $search, integer $mode) : boolean
inherited
Arguments
$value
string|arrayData value
$search
stringSearch value
Response
booleanComparision result
Compose a valid display name from the given structured contact data
compose_display_name( $contact, $full_email = false) : string
inherited static
Arguments
Response
stringDisplay name
Compose the name to display in the contacts list for the given contact record.
compose_list_name( $contact) : string
inherited static
This respects the settings parameter how to list conacts.
Arguments
Response
stringList name
Build contact display name for autocomplete listing
compose_search_name( $contact, $email = null, $name = null, $templ = null) : string
inherited static
Arguments
Response
stringDisplay name
Convert data stored in the database into output format
convert_db_data( $sql_arr)
Convert input data for storing in the database
convert_save_data( $save_data, $record = array())
Count number of available contacts in database
count() : \rcube_result_set
inherited abstract
Create a contact group with the given name
create_group( $name) : mixed
inherited
Arguments
Response
mixedFalse on error, array with record props in success
Mark one or more contact records as deleted
delete( $ids, $force = true)
inherited
Mark all records in database as deleted
delete_all(boolean $with_groups = false)
inherited
Arguments
$with_groups
booleanRemove also groups
Delete the given group and all linked group members
delete_group( $gid) : boolean
inherited
Arguments
Response
booleanTrue on success, false if no data was changed
Helper method to compose SQL where statements for fulltext searching
fulltext_sql_where( $value, $mode, $col = 'words', $bool = 'AND')
Utility function to return all values of a certain data column
either as flat list or grouped by subtype
get_col_values( $col, $data, $flat = false) : array
inherited static
Arguments
Response
arrayList of column values
Returns the last error occurred (e.g. when updating/inserting failed)
get_error() : array
inherited
Response
arrayHash array with the following fields: type, message
Get group properties such as name and email address(es)
get_group( $group_id) : array
inherited
Arguments
Response
arrayGroup properties as hash array
Returns addressbook name (e.g. for addressbooks listing)
get_name()
inherited abstract
Get a specific contact record
get_record( $id, $assoc = false) : \rcube_result_set|array
inherited abstract
Get group assignments of a specific contact record
get_record_groups( $id) : array
inherited
Arguments
Response
arrayList of assigned groups as ID=>Name pairs
Return the last result set
get_result() : \rcube_result_set
inherited abstract
Getter for saved search properties
get_search_set() : mixed
inherited abstract
Response
mixedSearch properties used by this class
Create a new contact record
insert( $save_data, $check = false) : mixed
inherited
Arguments
Response
mixedThe created record ID on success, False on error
Create new contact records for every item in the record set
insertMultiple( $recset, $check = false) : array
inherited
Arguments
Response
arrayList of created record IDs
List all active contact groups of this source
list_groups( $search = null, $mode) : array
inherited
Arguments
Response
arrayIndexed list of contact groups, each a hash array
List the current set of contact records
list_records( $cols = null, $subset) : array
inherited abstract
Arguments
Response
arrayIndexed list of contact records, each a hash array
Normalize the given string for fulltext search.
normalize_string( $str) : string
inherited static
Currently only optimized for Latin-1 characters; to be extended
|
deprecated
|
since 0.9-beta
|
Arguments
Response
stringNormalized string
Refresh saved search set after data has changed
refresh_search() : mixed
inherited
Response
mixedNew search set
Remove the given contact records from a certain group
remove_from_group( $group_id, $ids) : integer
inherited
Arguments
Response
integerNumber of deleted group members
Rename a specific contact group
rename_group( $gid, $newname, &$newid) : boolean
inherited
Arguments
Response
booleanNew name on success, false if no data was changed
Reset saved results and search parameters
reset()
inherited abstract
Search records
search( $fields, $value, $mode, $select = true, $nocount = false, $required = array()) : object
inherited abstract
Arguments
Response
objectrcube_result_set List of contact records and 'count' value
Setter for errors for internal use
set_error( $type, $message)
inherited
Setter for the current group
(empty, has to be re-implemented by extending class)
set_group( $gid)
inherited
Set internal list page
set_page( $page)
inherited
Set internal page size
set_pagesize( $size)
inherited
Save a search string for future listings
set_search_set( $filter)
inherited abstract
Set internal sort settings
set_sort_order(string $sort_col, string $sort_order = null)
inherited
Arguments
$sort_col
stringSort column
$sort_order
stringSort order
Unmark delete flag on contact record(s)
undelete( $ids)
inherited
Check for existing groups with the same name
unique_groupname(string $name) : string
Arguments
$name
stringName to check
Response
stringA group name which is unique for the current use
Update a specific contact record
update( $id, $save_cols) : mixed
inherited
Arguments
Response
mixedOn success if ID has been changed returns ID, otherwise True, False on error
Check the given data before saving.
validate( &$save_data, $autofix = false) : boolean
inherited
If input isn't valid, the message to display can be fetched using get_error()
Arguments
Response
booleanTrue if input is valid, False if not.
Constants
ERROR_READ_ONLY
ERROR_READ_ONLY
inherited
ERROR_NO_CONNECTION
ERROR_NO_CONNECTION
inherited
ERROR_VALIDATE
ERROR_VALIDATE
inherited
ERROR_SAVING
ERROR_SAVING
inherited
ERROR_SEARCH
ERROR_SEARCH
inherited
SEARCH_ALL
SEARCH_ALL
inherited
SEARCH_STRICT
SEARCH_STRICT
inherited
SEARCH_PREFIX
SEARCH_PREFIX
inherited
SEARCH_GROUPS
SEARCH_GROUPS
inherited
Properties
db_groupmembers
db_groupmembers :
vcard_fieldmap
vcard_fieldmap :
Store database connection.
db : \rcube_db
fulltext_cols
fulltext_cols :
primary_key
primary_key :
inherited
readonly
readonly :
inherited
groups
groups :
inherited
undelete
undelete :
inherited
list_page
list_page :
inherited
page_size
page_size :
inherited
group_id
group_id :
inherited
coltypes
coltypes :
inherited
date_cols
date_cols :
inherited
export_groups
export_groups :
inherited
searchonly
searchonly :
inherited
sort_col
sort_col :
inherited
sort_order
sort_order :
inherited