Abstract Class Zend_Db_Table_Row_Abstract

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

Located in /Db/Table/Row/Abstract.php (line 41)


	
			
Direct descendents
Class Description
 class Zend_Db_Table_Row Reference concrete class that extends Zend_Db_Table_Row_Abstract.
Variable Summary
Method Summary
 void __construct ([ $config = array()])
 int delete ()
 Zend_Db_Table_Rowset_Abstract findDependentRowset (string|Zend_Db_Table_Abstract $dependentTable, [string $ruleKey = null])
 Zend_Db_Table_Rowset_Abstract findManyToManyRowset (string|Zend_Db_Table_Abstract $matchTable, string|Zend_Db_Table_Abstract $intersectionTable, [string $callerRefRule = null], [string $matchRefRule = null])
 Zend_Db_Table_Row_Abstract findParentRow (string|Zend_Db_Table_Abstract $parentTable, [string $ruleKey = null])
 string getTableClass ()
 mixed save ()
 boolean setTable (Zend_Db_Table_Abstract $table)
 array toArray ()
 void _delete ()
 mixed _doInsert ()
 mixed _doUpdate ()
 array _getPrimaryKey ([bool $dirty = true])
 array _getWhereQuery ([ $dirty = true])
 void _insert ()
 void _postDelete ()
 void _postInsert ()
 void _postUpdate ()
 array _prepareReference (Zend_Db_Table_Abstract $dependentTable, Zend_Db_Table_Abstract $parentTable, string $ruleKey)
 void _refresh ()
 string _transformColumn (string $columnName)
 void _update ()
 string __get (string $columnName)
 boolean __isset (string $columnName)
 void __set (string $columnName, mixed $value)
 array __sleep ()
 void __wakeup ()
Variables
array $_cleanData = array() (line 60)

This is set to a copy of $_data when the data is fetched from a database, specified as a new tuple in the constructor, or when dirty data is posted to the database with save().

  • access: protected
boolean $_connected = true (line 76)

Connected is true if we have a reference to a live Zend_Db_Table_Abstract object.

This is false after the Rowset has been deserialized.

  • access: protected
array $_data = array() (line 51)

The data for each column in the row (column_name => value).

The keys must match the physical names of columns in the table for which this row is defined.

  • access: protected
array $_primary (line 90)

Primary row key(s).

  • access: protected
Zend_Db_Table_Abstract $_table = null (line 67)

Zend_Db_Table_Abstract parent class or instance.

  • access: protected
string $_tableClass = null (line 83)

Name of the class of the Zend_Db_Table_Abstract object.

  • access: protected
Methods
Constructor __construct (line 103)

Constructor.

Supported params for $config are:-

  • table = class name or object of type Zend_Db_Table_Abstract
  • data = values of columns in this row.

  • throws: Zend_Db_Table_Row_Exception
  • access: public
void __construct ([ $config = array()])
  • array $config: OPTIONAL Array of user-specified config options.
delete (line 441)

Deletes existing rows.

  • return: The number of rows deleted.
  • access: public
int delete ()
findDependentRowset (line 677)

Query a dependent table to retrieve rows matching the current row.

  • return: Query result from $dependentTable
  • throws: Zend_Db_Table_Row_Exception If $dependentTable is not a table or is not loadable.
  • access: public
Zend_Db_Table_Rowset_Abstract findDependentRowset (string|Zend_Db_Table_Abstract $dependentTable, [string $ruleKey = null])
findManyToManyRowset (line 755)
  • return: Query result from $matchTable
  • throws: Zend_Db_Table_Row_Exception If $matchTable or $intersectionTable is not a table class or is not loadable.
  • access: public
Zend_Db_Table_Rowset_Abstract findManyToManyRowset (string|Zend_Db_Table_Abstract $matchTable, string|Zend_Db_Table_Abstract $intersectionTable, [string $callerRefRule = null], [string $matchRefRule = null])
findParentRow (line 716)

Query a parent table to retrieve the single row matching the current row.

  • return: Query result from $parentTable
  • throws: Zend_Db_Table_Row_Exception If $parentTable is not a table or is not loadable.
  • access: public
Zend_Db_Table_Row_Abstract findParentRow (string|Zend_Db_Table_Abstract $parentTable, [string $ruleKey = null])
getTable (line 223)

Returns the table object, or null if this is disconnected row

  • access: public
Zend_Db_Table_Abstract|null getTable ()
getTableClass (line 276)

Query the class name of the Table object for which this Row was created.

  • access: public
string getTableClass ()
save (line 290)

Saves the properties to the database.

This performs an intelligent insert/update, and reloads the properties with fresh data from the table on success.

  • return: The primary key value(s), as an associative array if the key is compound, or a scalar if the key is single-column.
  • access: public
mixed save ()
setFromArray (line 502)

Sets all data in the row from an array.

  • return: Provides a fluent interface
  • access: public
Zend_Db_Table_Row_Abstract setFromArray ( $data)
  • array $data
setTable (line 236)

Set the table object, to re-establish a live connection to the database for a Row that has been de-serialized.

  • throws: Zend_Db_Table_Row_Exception
  • access: public
boolean setTable (Zend_Db_Table_Abstract $table)
toArray (line 491)

Returns the column/value data as an array.

  • access: public
array toArray ()
_delete (line 625)

Allows pre-delete logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _delete ()
_doInsert (line 308)
  • return: The primary key value(s), as an associative array if the key is compound, or a scalar if the key is single-column.
  • access: protected
mixed _doInsert ()
_doUpdate (line 355)
  • return: The primary key value(s), as an associative array if the key is compound, or a scalar if the key is single-column.
  • access: protected
mixed _doUpdate ()
_getPrimaryKey (line 531)

Retrieves an associative array of primary keys.

  • access: protected
array _getPrimaryKey ([bool $dirty = true])
  • bool $dirty
_getTable (line 516)

Retrieves an instance of the parent table.

  • access: protected
Zend_Db_Table_Abstract _getTable ()
_getWhereQuery (line 546)

Constructs where statement for retrieving row(s).

  • access: protected
array _getWhereQuery ([ $dirty = true])
  • $dirty
_insert (line 585)

Allows pre-insert logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _insert ()
_postDelete (line 635)

Allows post-delete logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _postDelete ()
_postInsert (line 595)

Allows post-insert logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _postInsert ()
_postUpdate (line 615)

Allows post-update logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _postUpdate ()
_prepareReference (line 649)

Prepares a table reference for lookup.

Ensures all reference keys are set and properly formatted.

  • access: protected
array _prepareReference (Zend_Db_Table_Abstract $dependentTable, Zend_Db_Table_Abstract $parentTable, string $ruleKey)
_refresh (line 565)

Refreshes properties from the database.

  • access: protected
void _refresh ()
_transformColumn (line 139)

Transform a column name from the user-specified form to the physical form used in the database.

You can override this method in a custom Row class to implement column name mappings, for example inflection.

  • return: The column name after transformation applied (none by default).
  • throws: Zend_Db_Table_Row_Exception if the $columnName is not a string.
  • access: protected
string _transformColumn (string $columnName)
  • string $columnName: Column name given.
_update (line 605)

Allows pre-update logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _update ()
__call (line 843)

Turn magic function calls into non-magic function calls to the above methods.

  • throws: Zend_Db_Table_Row_Exception If an invalid method is called.
  • access: protected
Zend_Db_Table_Row_Abstract|Zend_Db_Table_Rowset_Abstract __call (string $method,  $args)
  • string $method
  • array $args
__get (line 156)

Retrieve row field value

  • return: The corresponding column value.
  • throws: Zend_Db_Table_Row_Exception if the $columnName is not a column in the row.
  • access: public
string __get (string $columnName)
  • string $columnName: The user-specified column name.
__isset (line 190)

Test existence of row field

  • access: public
boolean __isset (string $columnName)
  • string $columnName: The column key.
__set (line 174)

Set row field value

  • throws: Zend_Db_Table_Row_Exception
  • access: public
void __set (string $columnName, mixed $value)
  • string $columnName: The column key.
  • mixed $value: The value for the property.
__sleep (line 201)

Store table, primary key and data in serialized object

  • access: public
array __sleep ()
__wakeup (line 213)

Setup to do on wakeup.

A de-serialized Row should not be assumed to have access to a live database connection, so set _connected = false.

  • access: public
void __wakeup ()

Documentation generated on Sun, 27 May 2007 23:20:07 -0700 by phpDocumentor 1.3.2