[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/addressbook/inc/ -> class.socontacts.inc.php (sommaire)

(pas de description)

Poids: 395 lignes (12 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

socontacts:: (8 méthodes):
  socontacts()
  db2data()
  data2db()
  delete()
  save()
  read()
  search()
  get_contact_conlumns()


Classe: socontacts  - X-Ref

General storage object of the adressbook

socontacts($contact_app='addressbook')   X-Ref


db2data($data)   X-Ref
changes the data from the db-format to your work-format

it gets called everytime when data is read from the db
This function needs to be reimplemented in the derived class

param: array $data

data2db($data)   X-Ref
changes the data from your work-format to the db-format

It gets called everytime when data gets writen into db or on keys for db-searches
this needs to be reimplemented in the derived class

param: array $data

delete($contact)   X-Ref
deletes contact entry including custom fields

param: array &$contact contact data from etemplate::exec
return: bool false if all went right

save(&$contact)   X-Ref
saves contact data including custiom felds

param: array &$contact contact data from etemplate::exec
return: bool false if all went wrong, errornumber on failure

read($contact_id)   X-Ref
reads contact data including custom fields

param: interger $contact_id contact_id
return: array/boolean data if row could be retrived else False

search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join='',$need_full_no_count=false)   X-Ref
searches db for rows matching searchcriteria

'*' and '?' are replaced with sql-wildcards '%' and '_'

param: array/string $criteria array of key and data cols, OR a SQL query (content for WHERE), fully quoted (!)
param: boolean/string $only_keys=true True returns only keys, False returns all cols. comma seperated list of keys to return
param: string $order_by='' fieldnames + {ASC|DESC} separated by colons ',', can also contain a GROUP BY (if it contains ORDER BY)
param: string/array $extra_cols='' string or array of strings to be added to the SELECT, eg. "count(*) as num"
param: string $wildcard='' appended befor and after each criteria
param: boolean $empty=false False=empty criteria are ignored in query, True=empty have to be empty in row
param: string $op='AND' defaults to 'AND', can be set to 'OR' too, then criteria's are OR'ed together
param: mixed $start=false if != false, return only maxmatch rows begining with start, or array($start,$num)
param: array $filter=null if set (!=null) col-data pairs, to be and-ed (!) into the query without wildcards
param: string $join='' sql to do a join, added as is after the table-name, eg. ", table2 WHERE x=y" or
param: boolean $need_full_no_count=false If true an unlimited query is run to determine the total number of rows, default false
return: array of matching rows (the row is an array of the cols) or False

get_contact_conlumns()   X-Ref
gets all contact fields from database




Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7