Abstract skeleton of an address book/repository
package |
Framework |
---|---|
subpackage |
Addressbook |
get_name()
set_search_set($filter)
get_search_set() : mixed
mixed
Search properties used by this class
reset()
refresh_search() : mixed
mixed
New search set
list_records($cols = null, $subset) : array
array
Indexed list of contact records, each a hash array
search($fields, $value, $mode, $select = true, $nocount = false, $required = array()) : object
object
rcube_result_set List of contact records and 'count' value
count() : \rcube_result_set
get_result() : \rcube_result_set
get_record($id, $assoc = false) : mixed
mixed
Result object with all record fields or False if not found
get_error() : array
array
Hash array with the following fields: type, message
set_error($type, $message)
close()
set_page($page)
access |
public |
---|---|
set_pagesize($size)
access |
public |
---|---|
set_sort_order(string $sort_col, string $sort_order = null)
string
Sort column
string
Sort order
validate(&$save_data, $autofix = false) : boolean
If input isn't valid, the message to display can be fetched using get_error()
boolean
True if input is valid, False if not.
insert($save_data, $check = false) : mixed
mixed
The created record ID on success, False on error
insertMultiple($recset, $check = false) : array
array
List of created record IDs
update($id, $save_cols) : mixed
mixed
On success if ID has been changed returns ID, otherwise True, False on error
delete($ids, $force = true)
undelete($ids)
delete_all(bool $with_groups = false)
bool
Remove also groups
set_group($gid)
list_groups($search = null, $mode) : array
array
Indexed list of contact groups, each a hash array
get_group($group_id) : array
array
Group properties as hash array
create_group($name) : mixed
mixed
False on error, array with record props in success
delete_group($gid) : boolean
boolean
True on success, false if no data was changed
rename_group($gid, $newname, &$newid) : boolean
boolean
New name on success, false if no data was changed
add_to_group($group_id, $ids) : int
int
Number of contacts added
remove_from_group($group_id, $ids) : int
int
Number of deleted group members
get_record_groups($id) : array
since | 0.5-beta |
---|---|
array
List of assigned groups as ID=>Name pairs
get_col_values($col, $data, $flat = false) : array
array
List of column values
normalize_string($str) : string
Currently only optimized for Latin-1 characters; to be extended
deprecated |
since 0.9-beta |
---|---|
string
Normalized string
compose_display_name($contact, $full_email = false) : string
string
Display name
compose_list_name($contact) : string
This respects the settings parameter how to list conacts.
string
List name
compose_contact_key($contact, $sort_col)
compare_search_value(string $colname, string|array $value, string $search, int $mode) : bool
string
Data name
string|array
Data value
string
Search value
int
Search mode
bool
Comparision result
ERROR_READ_ONLY
ERROR_NO_CONNECTION
ERROR_VALIDATE
ERROR_SAVING
ERROR_SEARCH
primary_key :
groups :
export_groups :
readonly :
searchonly :
undelete :
ready :
group_id :
list_page :
page_size :
sort_col :
sort_order :
coltypes :
date_cols :
error :