Abstract Class Zend_Db_Table_Row_Abstract

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

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


	
			
Direct descendents
Class Description
 class Zend_Db_Table_Row Reference concrete class that extends Zend_Db_Table_Row_Abstract.
Variable Summary
Method Summary
 Zend_Db_Table_Row_Abstract __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 ()
 integer save ()
 void setFromArray ( $data)
 boolean setTable (Zend_Db_Table_Abstract $table)
 array toArray ()
 void _delete ()
 array _getPrimaryKey ([bool $dirty = true])
 array _getWhereQuery ([ $dirty = true])
 void _insert ()
 array _prepareReference (Zend_Db_Table_Abstract $dependentTable, Zend_Db_Table_Abstract $parentTable, string $ruleKey)
 void _refresh ()
 string _transformColumn (string $key)
 void _update ()
 string __get (string $key)
 boolean __isset (string $key)
 void __set (string $key, mixed $value)
 array __sleep ()
 void __wakeup ()
Variables
array $_cleanData = array() (line 53)

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

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

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

Primary row key(s).

  • access: protected
Zend_Db_Table $_table = null (line 60)

Zend_Db_Table parent class or instance.

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

Name of the class of the Zend_Db_Table object.

  • access: protected
Methods
Constructor __construct (line 95)

Constructor.

Supported params for $config are:-

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

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

Deletes existing rows.

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

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

  • return: Query result from $dependentTable
  • access: public
  • throws: Zend_Db_Table_Row_Exception If $dependentTable is not a table or is not loadable.
Zend_Db_Table_Rowset_Abstract findDependentRowset (string|Zend_Db_Table_Abstract $dependentTable, [string $ruleKey = null])
findManyToManyRowset (line 604)
  • return: Query result from $matchTable
  • access: public
  • throws: Zend_Db_Table_Row_Exception If $matchTable and $intersectionTable are not a tables or are not loadable.
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 565)

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

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

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

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

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: 0 on failure, 1 on success.
  • access: public
  • throws: Zend_Db_Table_Row_Exception
integer save ()
setFromArray (line 383)

Sets all data in the row from an array.

  • access: public
void setFromArray ( $data)
  • array $data
setTable (line 223)

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

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

Returns the column/value data as an array.

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

Allows pre-delete logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _delete ()
_getPrimaryKey (line 410)

Retrieves an associative array of primary keys.

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

Retrieves an instance of the parent table.

  • access: protected
Zend_Db_Table _getTable ()
_getWhereQuery (line 425)

Constructs where statement for retrieving row(s).

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

Allows pre-insert logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _insert ()
_prepareReference (line 498)

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

Refreshes properties from the database.

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

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).
  • access: protected
  • throws: Zend_Db_Table_Row_Exception if the $key is not a string.
string _transformColumn (string $key)
  • string $key: Column name given.
_update (line 474)

Allows pre-update logic to be applied to row.

Subclasses may override this method.

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

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

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

Retrieve row field value

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

Test existence of row field

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

Set row field value

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

Store table, primary key and data in serialized object

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

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 Fri, 06 Apr 2007 18:15:00 -0700 by phpDocumentor 1.3.1