Abstract Class Zend_Db_Table

Description

Class for SQL table interface.

  • abstract:
  • license: Zend
  • copyright: Copyright (c) 2005-2006 Zend Technologies Inc. (http://www.zend.com)

Located in /Zend/Db/Table.php (line 49)


	
			
Variable Summary
 array $_cols
 Zend_Db_Adapter $_db
 Zend_Db_Adapter $_defaultDb
 array $_name
 string $_primary
Method Summary
 Zend_Db_Table __construct ([array $config = null])
 int delete (string $where)
 mixed fetchAll ([string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])
 mixed fetchRow ([string|array $where = null], [string|array $order = null], int $count, int $offset)
 array find (scalar|array $val)
 void getAdapter ()
 array info ()
 int insert (array &$data, string $where)
 void setDefaultAdapter (Zend_Db_Adapter $db)
 int update (array &$data, string $where)
 mixed _fetch (string $type, [string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])
 void _setup ()
Variables
array $_cols (line 87)

The table column names derived from Zend_Db_Adapter_*::describeTable().

The key is the underscore format, and the value is the camelized format.

  • access: protected
Zend_Db_Adapter $_db (line 70)

Zend_Db_Adapter object.

  • access: protected
Zend_Db_Adapter $_defaultDb (line 56)

Default Zend_Db_Adapter object.

  • access: protected
  • static:
Zend_Db_Inflector $_inflector (line 63)

For name inflections.

  • access: protected
  • static:
array $_name (line 77)

The table name derived from the class name (underscore format).

  • access: protected
string $_primary = 'id' (line 94)

The primary key column (underscore format).

  • access: protected
Methods
Constructor __construct (line 101)

Constructor.

  • access: public
Zend_Db_Table __construct ([array $config = null])
  • array $config: Array of user-specified config options.
delete (line 269)

Deletes existing rows.

The WHERE clause must be in native (underscore) format.

  • return: The number of rows deleted.
  • access: public
int delete (string $where)
  • string $where: An SQL WHERE clause.
fetchAll (line 316)

Fetches all rows.

Honors the Zend_Db_Adapter fetch mode.

  • return: The row results per the Zend_Db_Adapter fetch mode.
  • access: public
mixed fetchAll ([string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])
  • string|array $where: An SQL WHERE clause.
  • string|array $order: An SQL ORDER clause.
  • int $count: An SQL LIMIT count.
  • int $offset: An SQL LIMIT offset.
fetchNew (line 351)

Fetches a new blank row (not from the database).

  • access: public
Zend_Db_Table_Row fetchNew ()
fetchRow (line 337)

Fetches one row.

Honors the Zend_Db_Adapter fetch mode.

  • return: The row results per the Zend_Db_Adapter fetch mode.
  • access: public
mixed fetchRow ([string|array $where = null], [string|array $order = null], int $count, int $offset)
  • string|array $where: An SQL WHERE clause.
  • string|array $order: An SQL ORDER clause.
  • int $count: An SQL LIMIT count.
  • int $offset: An SQL LIMIT offset.
find (line 287)

Fetches rows by primary key.

  • return: Row(s) which matched the primary key value.
  • access: public
array find (scalar|array $val)
  • scalar|array $val: The value of the primary key.
getAdapter (line 157)

Gets the Zend_Db_Adapter for this particular Zend_Db_Table object.

  • access: public
void getAdapter ()
info (line 209)

Returns table information.

  • access: public
array info ()
insert (line 234)

Inserts a new row.

Columns must be in underscore format.

  • return: The last insert ID.
  • access: public
int insert (array &$data, string $where)
  • array $data: Column-value pairs.
  • string $where: An SQL WHERE clause.
setDefaultAdapter (line 135)

Sets the default Zend_Db_Adapter for all Zend_Db_Table objects.

  • access: public
  • static:
void setDefaultAdapter (Zend_Db_Adapter $db)
  • Zend_Db_Adapter $db: A Zend_Db_Adapter object.
update (line 252)

Updates existing rows.

Columns must be in underscore format.

  • return: The number of rows updated.
  • access: public
int update (array &$data, string $where)
  • array $data: Column-value pairs.
  • string $where: An SQL WHERE clause.
_fetch (line 373)

Support method for fetching rows.

  • return: The row results per the Zend_Db_Adapter fetch mode.
  • access: protected
mixed _fetch (string $type, [string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])
  • string $type: Whether to fetch 'all' or 'row'.
  • string|array $where: An SQL WHERE clause.
  • string|array $order: An SQL ORDER clause.
  • int $count: An SQL LIMIT count.
  • int $offset: An SQL LIMIT offset.
_getDefaultAdapter (line 148)

Gets the default Zend_Db_Adapter for all Zend_Db_Table objects.

  • access: protected
void _getDefaultAdapter ()
_setup (line 167)

Populate static properties for this table module.

  • access: protected
void _setup ()

Documentation generated on Tue, 18 Apr 2006 11:55:43 -0700 by phpDocumentor 1.3.0RC3