Constructor function.
AddressBook
AddressBook
()
Create a new address from $userdata, in backend $bnum.
Return the backend number that the/ address was added to, or false if it failed.
boolean|integer
add
(array $userdata, integer $bnum)
-
array
$userdata: array with firstname, lastname, email, nickname and label keys
-
integer
$bnum: backend number
Add a new backend.
boolean|integer
add_backend
(string $backend, [mixed $param = ''])
-
string
$backend: is the name of a backend (without the abook_ prefix)
-
mixed
$param: is an optional variable that is passed to the backend constructor. See each of the backend classes for valid parameters.
This function takes a $row array as returned by the addressbook search and returns an e-mail address with the full name or nickname optionally prepended.
string
full_address
(array $row)
-
array
$row: address book entry
Return an array of backends of a given type, or all backends if no type is specified.
array
get_backend_list
([string $type = ''])
Return all addresses
array|boolean
list_addr
([integer $bnum = -1])
-
integer
$bnum: backend number. -1 for search in all backends
Lookup an address by alias. Only possible in local backends.
array|boolean
lookup
(string $alias, [integer $bnum = -1])
-
string
$alias: nickname
-
integer
$bnum: backend number. -1 for search in all backends
Modifies address book entry identified by $alias from backend $bnum
boolean|integer
modify
(string $alias, array $userdata, integer $bnum)
-
string
$alias: modified address book entry
-
array
$userdata: array with address book entry
-
integer
$bnum: backend number
Remove the user identified by $alias from backend $bnum If $alias is an array, all users in the array are removed.
boolean|integer
remove
(array|string $alias, integer $bnum)
-
array|string
$alias: nickname or array with nicknames
-
integer
$bnum
Return a list of addresses matching expression in all backends of a given type.
array|boolean
search
(string $expression, [integer $bnum = -1])
-
string
$expression: search expression
-
integer
$bnum: backend number. -1 for search in all backends
Return a sorted search
array|boolean
s_search
(string $expression, [integer $bnum = -1])
-
string
$expression: search expression
-
integer
$bnum: backend number. -1 for search in all backends