Overview

Packages

  • Auth
  • Config
  • Controller
  • Date
  • Db
  • Feed
    • Abstract
    • Writers
  • File
    • Decorator
  • Form
    • Element
  • Image
  • Log
    • Writer
  • Net
    • Exception
    • REST
  • None
  • PHP
  • PHPMailer
  • Session
  • Util
  • Validate
    • Validator
  • Zend
    • Db
      • Adapter
      • Expr
      • Profiler
      • Select
      • Statement
      • Table
    • Loader
      • Autoloader
      • PluginLoader
    • Registry

Classes

  • Zend_Db_Table
  • Zend_Db_Table_Abstract
  • Zend_Db_Table_Definition
  • Zend_Db_Table_Row
  • Zend_Db_Table_Row_Abstract
  • Zend_Db_Table_Rowset
  • Zend_Db_Table_Rowset_Abstract
  • Zend_Db_Table_Select

Exceptions

  • Zend_Db_Table_Exception
  • Zend_Db_Table_Row_Exception
  • Zend_Db_Table_Rowset_Exception
  • Zend_Db_Table_Select_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Zend_Db_Table_Row_Abstract

Zend_Db_Table_Row_Abstract implements ArrayAccess, IteratorAggregate

Direct known subclasses

Zend_Db_Table_Row
Abstract
Package: Zend\Db\Table
Category: Zend
Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: New BSD License
Located at Zend/Db/Table/Row/Abstract.php
Methods summary
public
# __construct( array $config = array() )

Constructor.

Constructor.

Supported params for $config are:-

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

Parameters

$config
array
OPTIONAL Array of user-specified config options.

Throws

Zend_Db_Table_Row_Exception
protected string
# _transformColumn( string $columnName )

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.

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.

Parameters

$columnName
string
Column name given.

Returns

string
The column name after transformation applied (none by default).

Throws

Zend_Db_Table_Row_Exception
if the $columnName is not a string.
public string
# __get( string $columnName )

Retrieve row field value

Retrieve row field value

Parameters

$columnName
string
The user-specified column name.

Returns

string
The corresponding column value.

Throws

Zend_Db_Table_Row_Exception
if the $columnName is not a column in the row.
public
# __set( string $columnName, mixed $value )

Set row field value

Set row field value

Parameters

$columnName
string
The column key.
$value
mixed
The value for the property.

Throws

Zend_Db_Table_Row_Exception
public Zend_Db_Table_Row_Abstract
# __unset( string $columnName )

Unset row field value

Unset row field value

Parameters

$columnName
string
The column key.

Returns

Zend_Db_Table_Row_Abstract

Throws

Zend_Db_Table_Row_Exception
public boolean
# __isset( string $columnName )

Test existence of row field

Test existence of row field

Parameters

$columnName
string
The column key.

Returns

boolean
public array
# __sleep( )

Store table, primary key and data in serialized object

Store table, primary key and data in serialized object

Returns

array
public
# __wakeup( )

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.

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.

public boolean
# offsetExists( string $offset )

Proxy to __isset Required by the ArrayAccess implementation

Proxy to __isset Required by the ArrayAccess implementation

Parameters

$offset
string

Returns

boolean

Implementation of

ArrayAccess::offsetExists
public string
# offsetGet( string $offset )

Proxy to __get Required by the ArrayAccess implementation

Proxy to __get Required by the ArrayAccess implementation

Parameters

$offset
string

Returns

string

Implementation of

ArrayAccess::offsetGet
public
# offsetSet( string $offset, mixed $value )

Proxy to __set Required by the ArrayAccess implementation

Proxy to __set Required by the ArrayAccess implementation

Parameters

$offset
string
$value
mixed

Implementation of

ArrayAccess::offsetSet
public
# offsetUnset( string $offset )

Proxy to __unset Required by the ArrayAccess implementation

Proxy to __unset Required by the ArrayAccess implementation

Parameters

$offset
string

Implementation of

ArrayAccess::offsetUnset
public
# init( )

Initialize object

Initialize object

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

public Zend_Db_Table_Abstract|null
# getTable( )

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

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

Returns

Zend_Db_Table_Abstract|null
public boolean
# setTable( Zend_Db_Table_Abstract $table = null )

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

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

Parameters

$table
Zend_Db_Table_Abstract

Returns

boolean

Throws

Zend_Db_Table_Row_Exception
public string
# getTableClass( )

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

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

Returns

string
public boolean
# isConnected( )

Test the connected status of the row.

Test the connected status of the row.

Returns

boolean
public boolean
# isReadOnly( )

Test the read-only status of the row.

Test the read-only status of the row.

Returns

boolean
public boolean
# setReadOnly( boolean $flag )

Set the read-only status of the row.

Set the read-only status of the row.

Parameters

$flag
boolean

Returns

boolean
public Zend_Db_Table_Select
# select( )

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

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

Returns

Zend_Db_Table_Select
public mixed
# save( )

Saves the properties to the database.

Saves the properties to the database.

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

Returns

mixed
The primary key value(s), as an associative array if the key is compound, or a scalar if the key is single-column.
protected mixed
# _doInsert( )

Returns

mixed
The primary key value(s), as an associative array if the key is compound, or a scalar if the key is single-column.
protected mixed
# _doUpdate( )

Returns

mixed
The primary key value(s), as an associative array if the key is compound, or a scalar if the key is single-column.
public integer
# delete( )

Deletes existing rows.

Deletes existing rows.

Returns

integer
The number of rows deleted.
public
# getIterator( )

Implementation of

IteratorAggregate::getIterator
public array
# toArray( )

Returns the column/value data as an array.

Returns the column/value data as an array.

Returns

array
public Zend_Db_Table_Row_Abstract
# setFromArray( array $data )

Sets all data in the row from an array.

Sets all data in the row from an array.

Parameters

$data
array

Returns

Zend_Db_Table_Row_Abstract
Provides a fluent interface
public
# refresh( )

Refreshes properties from the database.

Refreshes properties from the database.

protected Zend_Db_Table_Abstract
# _getTable( )

Retrieves an instance of the parent table.

Retrieves an instance of the parent table.

Returns

Zend_Db_Table_Abstract
protected array
# _getPrimaryKey( boolean $useDirty = true )

Retrieves an associative array of primary keys.

Retrieves an associative array of primary keys.

Parameters

$useDirty
boolean

Returns

array
protected array
# _getWhereQuery( boolean $useDirty = true )

Constructs where statement for retrieving row(s).

Constructs where statement for retrieving row(s).

Parameters

$useDirty
boolean

Returns

array
protected
# _refresh( )

Refreshes properties from the database.

Refreshes properties from the database.

protected
# _insert( )

Allows pre-insert logic to be applied to row. Subclasses may override this method.

Allows pre-insert logic to be applied to row. Subclasses may override this method.

protected
# _postInsert( )

Allows post-insert logic to be applied to row. Subclasses may override this method.

Allows post-insert logic to be applied to row. Subclasses may override this method.

protected
# _update( )

Allows pre-update logic to be applied to row. Subclasses may override this method.

Allows pre-update logic to be applied to row. Subclasses may override this method.

protected
# _postUpdate( )

Allows post-update logic to be applied to row. Subclasses may override this method.

Allows post-update logic to be applied to row. Subclasses may override this method.

protected
# _delete( )

Allows pre-delete logic to be applied to row. Subclasses may override this method.

Allows pre-delete logic to be applied to row. Subclasses may override this method.

protected
# _postDelete( )

Allows post-delete logic to be applied to row. Subclasses may override this method.

Allows post-delete logic to be applied to row. Subclasses may override this method.

protected array
# _prepareReference( Zend_Db_Table_Abstract $dependentTable, Zend_Db_Table_Abstract $parentTable, string $ruleKey )

Prepares a table reference for lookup.

Prepares a table reference for lookup.

Ensures all reference keys are set and properly formatted.

Parameters

$dependentTable
Zend_Db_Table_Abstract
$parentTable
Zend_Db_Table_Abstract
$ruleKey
string

Returns

array
public Zend_Db_Table_Rowset_Abstract
# findDependentRowset( string|Zend_Db_Table_Abstract $dependentTable, string $ruleKey = null, Zend_Db_Table_Select $select = null )

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

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

Parameters

$dependentTable
string|Zend_Db_Table_Abstract
$ruleKey
string
OPTIONAL $ruleKey
$select
Zend_Db_Table_Select
OPTIONAL $select

Returns

Zend_Db_Table_Rowset_Abstract
Query result from $dependentTable

Throws

Zend_Db_Table_Row_Exception
If $dependentTable is not a table or is not loadable.
public Zend_Db_Table_Row_Abstract
# findParentRow( string|Zend_Db_Table_Abstract $parentTable, string $ruleKey = null, Zend_Db_Table_Select $select = null )

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

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

Parameters

$parentTable
string|Zend_Db_Table_Abstract
$ruleKey
string
OPTIONAL $ruleKey
$select
Zend_Db_Table_Select
OPTIONAL $select

Returns

Zend_Db_Table_Row_Abstract
Query result from $parentTable

Throws

Zend_Db_Table_Row_Exception
If $parentTable is not a table or is not loadable.
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 )

Parameters

$matchTable
string|Zend_Db_Table_Abstract
$intersectionTable
string|Zend_Db_Table_Abstract
$callerRefRule
string
OPTIONAL $callerRefRule
$matchRefRule
string
OPTIONAL $matchRefRule
$select
Zend_Db_Table_Select
OPTIONAL $select

Returns

Zend_Db_Table_Rowset_Abstract
Query result from $matchTable

Throws

Zend_Db_Table_Row_Exception
If $matchTable or $intersectionTable is not a table class or is not loadable.
public Zend_Db_Table_Row_Abstract|Zend_Db_Table_Rowset_Abstract
# __call( string $method, array $args )

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

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

Parameters

$method
string
$args
array
OPTIONAL Zend_Db_Table_Select query modifier

Returns

Zend_Db_Table_Row_Abstract|Zend_Db_Table_Rowset_Abstract

Throws

Zend_Db_Table_Row_Exception
If an invalid method is called.
protected Zend_Db_Table_Abstract
# _getTableFromString( string $tableName )

_getTableFromString

_getTableFromString

Parameters

$tableName
string

Returns

Zend_Db_Table_Abstract
Properties summary
protected array $_data array()
#

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.

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.

protected array $_cleanData array()
#

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().

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().

protected array $_modifiedFields array()
#

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

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

protected Zend_Db_Table_Abstract $_table null
#

Zend_Db_Table_Abstract parent class or instance.

Zend_Db_Table_Abstract parent class or instance.

protected boolean $_connected true
#

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.

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.

protected boolean $_readOnly false
#

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.

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.

protected string $_tableClass null
#

Name of the class of the Zend_Db_Table_Abstract object.

Name of the class of the Zend_Db_Table_Abstract object.

protected array $_primary
#

Primary row key(s).

Primary row key(s).

Pry Framework API documentation generated by ApiGen 2.6.1