[ Index ] |
|
Code source de PHP PEAR 1.4.5 |
[Code source] [Imprimer] [Statistiques]
Provides an object interface to a table row PHP versions 4 and 5
Author: | Stig Bakken <stig@php.net> |
Copyright: | 1997-2005 The PHP Group |
License: | http://www.php.net/license/3_0.txt PHP License 3.0 |
Version: | CVS: $Id: storage.php,v 1.22 2005/07/10 13:38:51 danielc Exp $ |
Poids: | 506 lignes (15 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 3 fois |
Nécessite: | 1 fichier DB.php |
DB_storage:: (12 méthodes):
DB_storage()
_makeWhere()
setup()
insert()
toString()
dump()
create()
set()
get()
_DB_storage()
store()
remove()
Classe: DB_storage - X-Ref
Provides an object interface to a table rowDB_storage($table, $keycolumn, &$dbh, $validator = null) X-Ref |
Constructor param: $table string the name of the database table param: $keycolumn mixed string with name of key column, or array of param: $dbh object database connection object param: $validator mixed function or method used to validate |
_makeWhere($keyval = null) X-Ref |
Utility method to build a "WHERE" clause to locate ourselves in the table. XXX future improvement: use rowids? |
setup($keyval) X-Ref |
Method used to initialize a DB_storage object from the configured table. param: $keyval mixed the key[s] of the row to fetch (string or array) return: int DB_OK on success, a DB error if not |
insert($newpk) X-Ref |
Create a new (empty) row in the configured table for this object. |
toString() X-Ref |
Output a simple description of this DB_storage object. return: string object description |
dump() X-Ref |
Dump the contents of this object to "standard output". |
create($table, &$data) X-Ref |
Static method used to create new DB storage objects. param: $data assoc. array where the keys are the names return: object a new instance of DB_storage or a subclass of it |
set($property, $newvalue) X-Ref |
Modify an attriute value. |
get($property) X-Ref |
Fetch an attribute value. param: string attribute name return: attribute contents, or null if the attribute name is |
_DB_storage() X-Ref |
Destructor, calls DB_storage::store() if there are changes that are to be kept. |
store() X-Ref |
Stores changes to this object in the database. return: DB_OK or a DB error |
remove() X-Ref |
Remove the row represented by this object from the database. return: mixed DB_OK or a DB error |
Généré le : Sun Feb 25 14:08:00 2007 | par Balluche grâce à PHPXref 0.7 |