Class addressbook_backend

Description

Generic backend that all other backends extend

Located in /functions/addressbook.php (line 809)


	
			
Direct descendents
Class Description
abook_database Address book in a database backend
abook_ldap_server Address book backend for LDAP server
abook_local_file Backend for address book as a pipe separated file
Variable Summary
string $bname
integer $bnum
string $btype
string $error
string $sname
bool $writeable
Method Summary
bool add (mixed $userdata)
string fullname (string $firstname, string $lastname)
bool list_addr ()
bool lookup (string $alias)
bool modify (string $alias, array $newuserdata)
bool remove (string $alias)
bool search (string $expression)
bool set_error (string $string)
Variables
string $bname = 'dummy' (line 823)

Internal backend name


Redefined in descendants as:
integer $bnum = -1 (line 838)

Backend number

string $btype = 'dummy' (line 818)

Backend type

Can be 'local' or 'remote'

  • var: backend type

Redefined in descendants as:
string $error = '' (line 843)

Error messages

string $sname = 'Dummy backend' (line 828)

Displayed backend name


Redefined in descendants as:
bool $writeable = false (line 848)

Writeable flag


Redefined in descendants as:
Methods
add (line 904)

Add entry to backend

bool add (mixed $userdata)

Redefined in descendants as:
fullname (line 940)

Creates full name from given name and surname

Handles name order differences. Function always runs in SquirrelMail gettext domain. Plugins don't have to switch domains before calling this function.

  • return: full name
  • since: 1.5.2
string fullname (string $firstname, string $lastname)
  • string $firstname: given name
  • string $lastname: surname
list_addr (line 894)

List all entries in backend

Working backend should provide this function or at least dummy function that returns empty array.

bool list_addr ()

Redefined in descendants as:
lookup (line 882)

Find entry in backend by alias

bool lookup (string $alias)
  • string $alias: name used for id

Redefined in descendants as:
modify (line 925)

Modify entry in backend

bool modify (string $alias, array $newuserdata)
  • string $alias: name used for id
  • array $newuserdata: new data

Redefined in descendants as:
remove (line 914)

Remove entry from backend

bool remove (string $alias)
  • string $alias: name used for id

Redefined in descendants as:
search (line 872)

Search for entries in backend

Working backend should support use of wildcards. * symbol should match one or more symbols. ? symbol should match any single symbol.

bool search (string $expression)
  • string $expression

Redefined in descendants as:
set_error (line 855)

Set error message

bool set_error (string $string)
  • string $string: error message

Documentation generated on Sat, 07 Oct 2006 16:08:48 +0300 by phpDocumentor 1.3.0RC6