Class Zend_Db_Table_Abstract
Class for SQL table interface.
Direct known subclasses
Zend_Db_TablePackage: 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/Abstract.php
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
#
addReference( string $ruleKey, string|array $columns, string $refTableClass, string|array $refColumns, string $onDelete = null, string $onUpdate = null )
Add a reference to the reference map |
public
|
|
public
array
|
|
public
|
|
public
array
|
|
public
|
#
setDefaultSource( string $defaultSource =
set the defaultSource property - this tells the table class where to find default values |
public
unknown
|
#
getDefaultSource( )
returns the default source flag that determines where defaultSources come from |
public
|
|
public
|
|
public static
|
#
setDefaultAdapter( mixed $db = null )
Sets the default Zend_Db_Adapter_Abstract for all Zend_Db_Table objects. |
public static
|
|
protected
|
|
public
|
|
protected static
|
|
public static
|
#
setDefaultMetadataCache( mixed $metadataCache = null )
Sets the default metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable(). |
public static
Zend_Cache_Core
|
#
getDefaultMetadataCache( )
Gets the default metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable(). |
protected
|
#
_setMetadataCache( mixed $metadataCache )
Sets the metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable(). |
public
Zend_Cache_Core
|
#
getMetadataCache( )
Gets the metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable(). |
public
|
#
setMetadataCacheInClass( boolean $flag )
Indicate whether metadata should be cached in the class for the duration of the instance |
public
boolean
|
#
metadataCacheInClass( )
Retrieve flag indicating if metadata should be cached for duration of instance |
protected static
Zend_Cache_Core
|
|
protected
Zend_Db_Table_Adapter_Abstract
|
#
_setSequence( mixed $sequence )
Sets the sequence member, which defines the behavior for generating primary key values in new rows.
|
protected
|
|
protected
|
|
protected
|
|
protected
boolean
|
|
protected
array
|
|
protected
|
#
_setupPrimaryKey( )
Initialize primary key from metadata. If $_primary is not defined, discover primary keys from the information returned by describeTable(). |
protected
array
|
|
public
|
|
public
mixed
|
|
public
|
#
select( boolean $withFromPart =
Returns an instance of a Zend_Db_Table_Select object. |
public
mixed
|
|
public
boolean
|
|
public
integer
|
|
public
integer
|
#
_cascadeUpdate( string $parentTableClassname, array $oldPrimaryKey, array $newPrimaryKey )
Called by a row object for the parent table's class during save() method. |
public
integer
|
|
public
integer
|
#
_cascadeDelete( string $parentTableClassname, array $primaryKey )
Called by parent table's class during delete() method. |
public
|
|
public
|
#
fetchAll( string|array|
Fetches all rows. |
public
|
#
fetchRow( string|array|
Fetches one row in an object of type Zend_Db_Table_Row_Abstract, or returns null if no row matches the specified criteria. |
public
|
|
protected
|
#
_where(
Generate WHERE clause from user-supplied string or array |
protected
|
#
_order(
Generate ORDER clause from user-supplied string or array |
protected
array
|
string
|
ADAPTER
|
'db' |
|
string
|
DEFINITION
|
'definition' |
|
string
|
DEFINITION_CONFIG_NAME
|
'definitionConfigName' |
|
string
|
SCHEMA
|
'schema' |
|
string
|
NAME
|
'name' |
|
string
|
PRIMARY
|
'primary' |
|
string
|
COLS
|
'cols' |
|
string
|
METADATA
|
'metadata' |
|
string
|
METADATA_CACHE
|
'metadataCache' |
|
string
|
METADATA_CACHE_IN_CLASS
|
'metadataCacheInClass' |
|
string
|
ROW_CLASS
|
'rowClass' |
|
string
|
ROWSET_CLASS
|
'rowsetClass' |
|
string
|
REFERENCE_MAP
|
'referenceMap' |
|
string
|
DEPENDENT_TABLES
|
'dependentTables' |
|
string
|
SEQUENCE
|
'sequence' |
|
string
|
COLUMNS
|
'columns' |
|
string
|
REF_TABLE_CLASS
|
'refTableClass' |
|
string
|
REF_COLUMNS
|
'refColumns' |
|
string
|
ON_DELETE
|
'onDelete' |
|
string
|
ON_UPDATE
|
'onUpdate' |
|
string
|
CASCADE
|
'cascade' |
|
string
|
RESTRICT
|
'restrict' |
|
string
|
SET_NULL
|
'setNull' |
|
string
|
DEFAULT_NONE
|
'defaultNone' |
|
string
|
DEFAULT_CLASS
|
'defaultClass' |
|
string
|
DEFAULT_DB
|
'defaultDb' |
|
boolean
|
SELECT_WITH_FROM_PART
|
true |
|
boolean
|
SELECT_WITHOUT_FROM_PART
|
false |
protected static
|
$_defaultDb |
|
#
Default Zend_Db_Adapter_Abstract object. |
protected
unknown_type
|
$_definition | null |
#
Optional Zend_Db_Table_Definition object |
protected
string
|
$_definitionConfigName | null |
#
Optional definition config name used in concrete implementation |
protected static
Zend_Cache_Core
|
$_defaultMetadataCache | null |
#
Default cache for information provided by the adapter's describeTable() method. |
protected
|
$_db |
|
#
Zend_Db_Adapter_Abstract object. |
protected
array
|
$_schema | null |
#
The schema name (default null means current schema) |
protected
string
|
$_name | null |
#
The table name. |
protected
array
|
$_cols |
|
#
The table column names derived from Zend_Db_Adapter_Abstract::describeTable(). |
protected
mixed
|
$_primary | null |
#
The primary key column or columns. A compound key should be declared as an array. You may declare a single-column primary key as a string. |
protected
integer
|
$_identity | 1 |
#
If your primary key is a compound key, and one of the columns uses an auto-increment or sequence-generated value, set _identity to the ordinal index in the $_primary array for that column. Note this index is the position of the column in the primary key, not the position of the column in the table. The primary key array is 1-based. |
protected
mixed
|
$_sequence | true |
#
Define the logic for new values in the primary key. May be a string, boolean true, or boolean false. |
protected
array
|
$_metadata | array() |
#
Information provided by the adapter's describeTable() method. |
protected
Zend_Cache_Core
|
$_metadataCache | null |
#
Cache for information provided by the adapter's describeTable() method. |
protected
boolean
|
$_metadataCacheInClass | true |
#
Flag: whether or not to cache metadata in the class |
protected
string
|
$_rowClass | 'Zend_Db_Table_Row' |
#
Classname for row |
protected
string
|
$_rowsetClass | 'Zend_Db_Table_Rowset' |
#
Classname for rowset |
protected
array
|
$_referenceMap | array() |
#
Associative array map of declarative referential integrity rules. This array has one entry per foreign key in the current table. Each key is a mnemonic name for one reference rule. |
protected
array
|
$_dependentTables | array() |
#
Simple array of class names of tables that are "children" of the current table, in other words tables that contain a foreign key to this one. Array elements are not table names; they are class names of classes that extend Zend_Db_Table_Abstract. |
protected
string
|
$_defaultSource |
|
|
protected
array
|
$_defaultValues | array() |