Abstract Class Zend_Db_Table_Row_Abstract

Description

Implements interfaces:

  • ArrayAccess (internal interface)
  • IteratorAggregate (internal interface)

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

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


	
			
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_Select $select = 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_Select $select = null])
 Zend_Db_Table_Row_Abstract findParentRow (string|Zend_Db_Table_Abstract $parentTable, [string $ruleKey = null], [Zend_Db_Table_Select $select = null])
 void getIterator ()
 string getTableClass ()
 void init ()
 boolean isConnected ()
 boolean isReadOnly ()
 boolean offsetExists (string $offset)
 string offsetGet (string $offset)
 void offsetSet (string $offset, mixed $value)
 void offsetUnset (string $offset)
 void refresh ()
 mixed save ()
 boolean setReadOnly (boolean $flag)
 boolean setTable ([Zend_Db_Table_Abstract $table = null])
 array toArray ()
 void _delete ()
 mixed _doInsert ()
 mixed _doUpdate ()
 array _getPrimaryKey ([bool $useDirty = true])
 array _getWhereQuery ([bool $useDirty = 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 ()
 Zend_Db_Table_Row_Abstract __unset (string $columnName)
 void __wakeup ()
Variables
array $_cleanData = array() (line 54)

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

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

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 $_modifiedFields = array() (line 62)

Tracks columns where data has been updated. Allows more specific insert and update operations.

  • access: protected
array $_primary (line 101)

Primary row key(s).

  • access: protected
boolean $_readOnly = false (line 87)

A row is marked read only if it contains columns that are not physically represented within the database schema (e.g. evaluated columns/Zend_Db_Expr columns). This can also be passed as a run-time config options as a means of protecting row data.

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

Zend_Db_Table_Abstract parent class or instance.

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

Name of the class of the Zend_Db_Table_Abstract object.

  • access: protected
Methods
Constructor __construct (line 114)

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

Deletes existing rows.

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

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], [Zend_Db_Table_Select $select = null])
findManyToManyRowset (line 990)
  • 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], [Zend_Db_Table_Select $select = null])
findParentRow (line 923)

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], [Zend_Db_Table_Select $select = null])
getIterator (line 645)
  • access: public
void getIterator ()

Implementation of:
IteratorAggregate::getIterator
getTable (line 322)

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

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

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

  • access: public
string getTableClass ()
init (line 313)

Initialize object

Called from __construct() as final step of object instantiation.

  • access: public
void init ()
isConnected (line 385)

Test the connected status of the row.

  • access: public
boolean isConnected ()
isReadOnly (line 395)

Test the read-only status of the row.

  • access: public
boolean isReadOnly ()
offsetExists (line 266)

Proxy to __isset Required by the ArrayAccess implementation

  • access: public
boolean offsetExists (string $offset)
  • string $offset

Implementation of:
ArrayAccess::offsetExists
offsetGet (line 278)

Proxy to __get Required by the ArrayAccess implementation

  • access: public
string offsetGet (string $offset)
  • string $offset

Implementation of:
ArrayAccess::offsetGet
offsetSet (line 290)

Proxy to __set Required by the ArrayAccess implementation

  • access: public
void offsetSet (string $offset, mixed $value)
  • string $offset
  • mixed $value

Implementation of:
ArrayAccess::offsetSet
offsetUnset (line 301)

Proxy to __unset Required by the ArrayAccess implementation

  • access: public
void offsetUnset (string $offset)
  • string $offset

Implementation of:
ArrayAccess::offsetUnset
refresh (line 682)

Refreshes properties from the database.

  • access: public
void refresh ()
save (line 430)

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 ()
select (line 416)

Returns an instance of the parent table's Zend_Db_Table_Select object.

  • access: public
setFromArray (line 666)

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
setReadOnly (line 406)

Set the read-only status of the row.

  • access: public
boolean setReadOnly (boolean $flag)
  • boolean $flag
setTable (line 335)

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 = null])
toArray (line 655)

Returns the column/value data as an array.

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

Allows pre-delete logic to be applied to row.

Subclasses may override this method.

  • access: protected
void _delete ()
_doInsert (line 448)
  • 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 506)
  • 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 707)

Retrieves an associative array of primary keys.

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

Retrieves an instance of the parent table.

  • access: protected
Zend_Db_Table_Abstract _getTable ()
_getTableFromString (line 1168)

_getTableFromString

  • access: protected
Zend_Db_Table_Abstract _getTableFromString (string $tableName)
  • string $tableName
_getWhereQuery (line 733)

Constructs where statement for retrieving row(s).

  • access: protected
array _getWhereQuery ([bool $useDirty = true])
  • bool $useDirty
_insert (line 778)

Allows pre-insert logic to be applied to row.

Subclasses may override this method.

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

Allows post-delete logic to be applied to row.

Subclasses may override this method.

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

Allows post-insert logic to be applied to row.

Subclasses may override this method.

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

Allows post-update logic to be applied to row.

Subclasses may override this method.

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

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

Refreshes properties from the database.

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

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

Allows pre-update logic to be applied to row.

Subclasses may override this method.

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

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: public
Zend_Db_Table_Row_Abstract|Zend_Db_Table_Rowset_Abstract __call (string $method,  $args)
  • string $method
  • array $args: OPTIONAL Zend_Db_Table_Select query modifier
__get (line 174)

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

Test existence of row field

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

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

Store table, primary key and data in serialized object

  • access: public
array __sleep ()
__unset (line 210)

Unset row field value

  • throws: Zend_Db_Table_Row_Exception
  • access: public
Zend_Db_Table_Row_Abstract __unset (string $columnName)
  • string $columnName: The column key.
__wakeup (line 254)

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 Mon, 21 Jun 2010 15:05:17 -0400 by phpDocumentor 1.4.3