Class PhpFunk_DB_TableDataGateway

Description
  • version: CVS: $Id: TableDataGateway.php,v 1.1 2008/05/10 15:40:55 tom Exp $
  • uses: PhpFunk_DB_DBWrapper

Located in /DB/TableDataGateway.php (line 8)


	
			
Variable Summary
 DBWrapper $_conn
 mixed $_pkey
 string $_table
Method Summary
 int delete (mixed $id)
 array find (mixed $id)
 void findAll ([ $where = NULL], [ $limit = 0], [ $offset = 0])
 array insert (array $row)
 int numRecords ([ $where = NULL])
 void TableDataGateway ( &$conn, string $table,  $pkey, DBWrapper $conn)
 boolean update (array $row)
Variables
DBWrapper $_conn (line 15)
  • access: private
mixed $_pkey (line 23)
string $_table (line 21)
  • var: name of table
  • access: private
Methods
delete (line 64)

Returns number of rows deleted or FALSE on error

int delete (mixed $id)
  • mixed $id: primary key for table (could be a string)
find (line 41)
array find (mixed $id)
  • mixed $id: _table primary key
findAll (line 47)
void findAll ([ $where = NULL], [ $limit = 0], [ $offset = 0])
  • $where
  • $limit
  • $offset
insert (line 99)

Returns the id of the inserted row or FALSE on error

array insert (array $row)
  • array $row: assoc array
numRecords (line 76)
int numRecords ([ $where = NULL])
  • $where
TableDataGateway (line 29)
void TableDataGateway ( &$conn, string $table,  $pkey, DBWrapper $conn)
  • DBWrapper $conn: connection to database
  • string $table: name of table this gateway accesses
  • &$conn
  • $pkey
update (line 128)

Updates $row using $pkey as where clause

Triggers error if $row's pkey field is not set.

boolean update (array $row)
  • array $row: assoc. array

Documentation generated on Sun, 08 Jun 2008 22:21:32 -0700 by phpDocumentor 1.4.0