[ 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.bocontacts.inc.php (sommaire)

(pas de description)

Poids: 317 lignes (11 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 1 fichier
 addressbook/inc/class.socontacts.inc.php

Définit 1 class

bocontacts:: (8 méthodes):
  bocontacts()
  db2data()
  data2db()
  delete()
  save()
  read()
  search()
  check_perms()


Classe: bocontacts  - X-Ref

General business object of the adressbook

bocontacts($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 in db

param: mixed &contact contact array from etemplate::exec or id
return: bool false if all went right

save(&$contact)   X-Ref
saves contact to db

param: array &contact contact array from etemplate::exec
return: array $contact

read($keys,$extra_cols='',$join='')   X-Ref
reads contacts matched by key and puts all cols in the data array

param: array $keys array with keys in form internalName => value, may be a scalar value if only one key
param: string/array $extra_cols string or array of strings to be added to the SELECT, eg. "count(*) as num"
param: string $join='' sql to do a join, added as is after the table-name, eg. ", table2 WHERE x=y" or
return: array with data or errormessage

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 contacts for rows matching searchcriteria

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

check_perms($needed,&$contact)   X-Ref
Checks if the current user has the necessary ACL rights

param: int $needed necessary ACL right: EGW_ACL_{READ|EDIT|DELETE}
param: mixed $contact contact as array or the contact-id
return: boolean true permission granted or false for permission denied



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