Abstract Class Zend_Db_Table

Description

Class for SQL table interface.

  • abstract:
  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

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


	
			
Variable Summary
Method Summary
 Zend_Db_Table __construct ([array $config = array()])
 int delete (string $where)
 Zend_Db_Table_Rowset fetchAll ([string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])
 Zend_Db_Table_Row fetchRow ([string|array $where = null], [string|array $order = null])
 array find (scalar|array $val)
 array info ()
 int insert ( &$data, array $data, string $where)
 int update ( &$data, string $where, array $data)
 mixed _fetch (string $type, [string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])
 void _setup ([ $config = array()])
Variables
static Zend_Db_Adapter_Abstract $_defaultDb (line 51)

Default Zend_Db_Adapter_Abstract object.

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

For name inflections.

  • access: protected
array $_cols (line 82)

The table column names derived from Zend_Db_Adapter_Abstract::describeTable().

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

  • access: protected
Zend_Db_Adapter_Abstract $_db (line 65)

Zend_Db_Adapter_Abstract object.

  • access: protected
array $_name (line 72)

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

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

The primary key column (underscore format).

  • access: protected
Methods
static setDefaultAdapter (line 133)

Sets the default Zend_Db_Adapter_Abstract for all Zend_Db_Table objects.

  • access: public
  • throws: Zend_Db_Table_Exception
static void setDefaultAdapter (Zend_Db_Adapter_Abstract $db)
Constructor __construct (line 97)

Constructor.

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

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 324)

Fetches all rows.

Honors the Zend_Db_Adapter_Abstract fetch mode.

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

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

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

Fetches one row.

Honors the Zend_Db_Adapter_Abstract fetch mode.

  • return: The row results per the Zend_Db_Adapter_Abstract fetch mode.
  • access: public
Zend_Db_Table_Row fetchRow ([string|array $where = null], [string|array $order = null])
  • string|array $where: OPTIONAL An SQL WHERE clause.
  • string|array $order: OPTIONAL An SQL ORDER clause.
find (line 295)

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_Abstract for this particular Zend_Db_Table object.

  • access: public
Zend_Db_Adapter_Abstract getAdapter ()
info (line 217)

Returns table information.

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

Inserts a new row.

Columns must be in underscore format.

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

Updates existing rows.

Columns must be in underscore format.

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

Support method for fetching rows.

  • return: The row results per the Zend_Db_Adapter_Abstract 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: OPTIONAL An SQL WHERE clause.
  • string|array $order: OPTIONAL An SQL ORDER clause.
  • int $count: OPTIONAL An SQL LIMIT count.
  • int $offset: OPTIONAL An SQL LIMIT offset.
_getDefaultAdapter (line 147)

Gets the default Zend_Db_Adapter_Abstract for all Zend_Db_Table objects.

  • access: protected
Zend_Db_Adapter_Abstract _getDefaultAdapter ()
_setup (line 168)

Populate static properties for this table module.

  • access: protected
  • throws: Zend_Db_Table_Exception
void _setup ([ $config = array()])
  • $config

Documentation generated on Wed, 21 Feb 2007 12:00:48 -0800 by phpDocumentor 1.3.1