Session/SaveHandler/DbTable.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-webat this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Session
- Version
- $Id: DbTable.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Session_SaveHandler_DbTable
Zend_Session_SaveHandler_DbTable
- Implements
- \Zend_Session_SaveHandler_Interface
- Parent(s)
- \Zend_Db_Table_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
ADAPTER
= 'db'- Inherited_from
- \Zend_Db_Table_Abstract::ADAPTER
DEFINITION
= 'definition'- Inherited_from
- \Zend_Db_Table_Abstract::DEFINITION
DEFINITION_CONFIG_NAME
= 'definitionConfigName'- Inherited_from
- \Zend_Db_Table_Abstract::DEFINITION_CONFIG_NAME
SCHEMA
= 'schema'- Inherited_from
- \Zend_Db_Table_Abstract::SCHEMA
NAME
= 'name'- Inherited_from
- \Zend_Db_Table_Abstract::NAME
PRIMARY
= 'primary'- Inherited_from
- \Zend_Db_Table_Abstract::PRIMARY
COLS
= 'cols'- Inherited_from
- \Zend_Db_Table_Abstract::COLS
METADATA
= 'metadata'- Inherited_from
- \Zend_Db_Table_Abstract::METADATA
METADATA_CACHE
= 'metadataCache'- Inherited_from
- \Zend_Db_Table_Abstract::METADATA_CACHE
METADATA_CACHE_IN_CLASS
= 'metadataCacheInClass'- Inherited_from
- \Zend_Db_Table_Abstract::METADATA_CACHE_IN_CLASS
ROW_CLASS
= 'rowClass'- Inherited_from
- \Zend_Db_Table_Abstract::ROW_CLASS
ROWSET_CLASS
= 'rowsetClass'- Inherited_from
- \Zend_Db_Table_Abstract::ROWSET_CLASS
REFERENCE_MAP
= 'referenceMap'- Inherited_from
- \Zend_Db_Table_Abstract::REFERENCE_MAP
DEPENDENT_TABLES
= 'dependentTables'- Inherited_from
- \Zend_Db_Table_Abstract::DEPENDENT_TABLES
SEQUENCE
= 'sequence'- Inherited_from
- \Zend_Db_Table_Abstract::SEQUENCE
COLUMNS
= 'columns'- Inherited_from
- \Zend_Db_Table_Abstract::COLUMNS
REF_TABLE_CLASS
= 'refTableClass'- Inherited_from
- \Zend_Db_Table_Abstract::REF_TABLE_CLASS
REF_COLUMNS
= 'refColumns'- Inherited_from
- \Zend_Db_Table_Abstract::REF_COLUMNS
ON_DELETE
= 'onDelete'- Inherited_from
- \Zend_Db_Table_Abstract::ON_DELETE
ON_UPDATE
= 'onUpdate'- Inherited_from
- \Zend_Db_Table_Abstract::ON_UPDATE
CASCADE
= 'cascade'- Inherited_from
- \Zend_Db_Table_Abstract::CASCADE
CASCADE_RECURSE
= 'cascadeRecurse'- Inherited_from
- \Zend_Db_Table_Abstract::CASCADE_RECURSE
RESTRICT
= 'restrict'- Inherited_from
- \Zend_Db_Table_Abstract::RESTRICT
SET_NULL
= 'setNull'- Inherited_from
- \Zend_Db_Table_Abstract::SET_NULL
DEFAULT_NONE
= 'defaultNone'- Inherited_from
- \Zend_Db_Table_Abstract::DEFAULT_NONE
DEFAULT_CLASS
= 'defaultClass'- Inherited_from
- \Zend_Db_Table_Abstract::DEFAULT_CLASS
DEFAULT_DB
= 'defaultDb'- Inherited_from
- \Zend_Db_Table_Abstract::DEFAULT_DB
SELECT_WITH_FROM_PART
= true- Inherited_from
- \Zend_Db_Table_Abstract::SELECT_WITH_FROM_PART
SELECT_WITHOUT_FROM_PART
= false- Inherited_from
- \Zend_Db_Table_Abstract::SELECT_WITHOUT_FROM_PART
Properties

array $_cols = The table column names derived from Zend_Db_Adapter_Abstract::describeTable().
Inherited from: \Zend_Db_Table_Abstract::$$_cols- Type
- array
- Inherited_from
- \Zend_Db_Table_Abstract::$$_cols

\Zend_Db_Adapter_Abstract $_db =
- Type
- \Zend_Db_Adapter_Abstract
- Inherited_from
- \Zend_Db_Table_Abstract::$$_db

\Zend_Db_Adapter_Abstract $_defaultDb = Default Zend_Db_Adapter_Abstract object.
Inherited from: \Zend_Db_Table_Abstract::$$_defaultDb- Type
- \Zend_Db_Adapter_Abstract
- Inherited_from
- \Zend_Db_Table_Abstract::$$_defaultDb

\Zend_Cache_Core $_defaultMetadataCache = nullDefault cache for information provided by the adapter's describeTable() method.
Inherited from: \Zend_Db_Table_Abstract::$$_defaultMetadataCachenullDetails- Type
- \Zend_Cache_Core
- Inherited_from
- \Zend_Db_Table_Abstract::$$_defaultMetadataCache

$_defaultSource = self::DEFAULT_NONEself::DEFAULT_NONEDetails- Type
- n/a
- Inherited_from
- \Zend_Db_Table_Abstract::$$_defaultSource

$_defaultValues = array()array()Details- Type
- n/a
- Inherited_from
- \Zend_Db_Table_Abstract::$$_defaultValues

\unknown_type $_definition = nullOptional Zend_Db_Table_Definition object
Inherited from: \Zend_Db_Table_Abstract::$$_definitionnullDetails- Type
- \unknown_type
- Inherited_from
- \Zend_Db_Table_Abstract::$$_definition

string $_definitionConfigName = nullOptional definition config name used in concrete implementation
Inherited from: \Zend_Db_Table_Abstract::$$_definitionConfigNamenullDetails- Type
- string
- Inherited_from
- \Zend_Db_Table_Abstract::$$_definitionConfigName

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.
Inherited from: \Zend_Db_Table_Abstract::$$_dependentTablesArray elements are not table names; they are class names of classes that extend Zend_Db_Table_Abstract.
array()Details- Type
- array
- Inherited_from
- \Zend_Db_Table_Abstract::$$_dependentTables

integer $_identity = 1If 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.
Inherited from: \Zend_Db_Table_Abstract::$$_identityNote 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.
1Details- Type
- integer
- Inherited_from
- \Zend_Db_Table_Abstract::$$_identity

array $_metadata = array()Information provided by the adapter's describeTable() method.
Inherited from: \Zend_Db_Table_Abstract::$$_metadataarray()Details- Type
- array
- Inherited_from
- \Zend_Db_Table_Abstract::$$_metadata

\Zend_Cache_Core $_metadataCache = nullCache for information provided by the adapter's describeTable() method.
Inherited from: \Zend_Db_Table_Abstract::$$_metadataCachenullDetails- Type
- \Zend_Cache_Core
- Inherited_from
- \Zend_Db_Table_Abstract::$$_metadataCache

bool $_metadataCacheInClass = trueFlag: whether or not to cache metadata in the class
Inherited from: \Zend_Db_Table_Abstract::$$_metadataCacheInClasstrueDetails- Type
- bool
- Inherited_from
- \Zend_Db_Table_Abstract::$$_metadataCacheInClass

string $_modifiedColumn = nullSession table last modification time column
nullDetails- Type
- string

string $_name = null
nullDetails- Type
- string
- Inherited_from
- \Zend_Db_Table_Abstract::$$_name

boolean $_overrideLifetime = falseWhether or not the lifetime of an existing session should be overridden
falseDetails- Type
- boolean

mixed $_primary = null
A compound key should be declared as an array. You may declare a single-column primary key as a string.
nullDetails- Type
- mixed
- Inherited_from
- \Zend_Db_Table_Abstract::$$_primary

array $_primaryAssignment = nullSession table primary key value assignment
nullDetails- Type
- array

array $_referenceMap = array()Associative array map of declarative referential integrity rules.
Inherited from: \Zend_Db_Table_Abstract::$$_referenceMapThis array has one entry per foreign key in the current table. Each key is a mnemonic name for one reference rule.
Each value is also an associative array, with the following keys: - columns = array of names of column(s) in the child table. - refTableClass = class name of the parent table. - refColumns = array of names of column(s) in the parent table, in the same order as those in the 'columns' entry. - onDelete = "cascade" means that a delete in the parent table also causes a delete of referencing rows in the child table. - onUpdate = "cascade" means that an update of primary key values in the parent table also causes an update of referencing rows in the child table.
array()Details- Type
- array
- Inherited_from
- \Zend_Db_Table_Abstract::$$_referenceMap

string $_rowClass = 'Zend_Db_Table_Row'
'Zend_Db_Table_Row'Details- Type
- string
- Inherited_from
- \Zend_Db_Table_Abstract::$$_rowClass

string $_rowsetClass = 'Zend_Db_Table_Rowset'
'Zend_Db_Table_Rowset'Details- Type
- string
- Inherited_from
- \Zend_Db_Table_Abstract::$$_rowsetClass

array $_schema = nullThe schema name (default null means current schema)
Inherited from: \Zend_Db_Table_Abstract::$$_schemanullDetails- Type
- array
- Inherited_from
- \Zend_Db_Table_Abstract::$$_schema

mixed $_sequence = trueDefine the logic for new values in the primary key.
Inherited from: \Zend_Db_Table_Abstract::$$_sequenceMay be a string, boolean true, or boolean false.
trueDetails- Type
- mixed
- Inherited_from
- \Zend_Db_Table_Abstract::$$_sequence
Methods

__construct(\Zend_Config | array $config) : voidConstructor
$config is an instance of Zend_Config or an array of key/value pairs containing configuration options for Zend_Session_SaveHandler_DbTable and Zend_Db_Table_Abstract. These are the configuration options for Zend_Session_SaveHandler_DbTable:
primaryAssignment => (string|array) Session table primary key value assignment (optional; default: 1 => sessionId) You have to assign a value to each primary key of your session table. The value of this configuration option is either a string if you have only one primary key or an array if you have multiple primary keys. The array consists of numeric keys starting at 1 and string values. There are some values which will be replaced by session information:
sessionId => The id of the current session
sessionName => The name of the current session
sessionSavePath => The save path of the current session
NOTE: One of your assignments MUST contain 'sessionId' as value!
modifiedColumn => (string) Session table last modification time column
lifetimeColumn => (string) Session table lifetime column
dataColumn => (string) Session table data column
lifetime => (integer) Session lifetime (optional; default: ini_get('session.gc_maxlifetime'))
overrideLifetime => (boolean) Whether or not the lifetime of an existing session should be overridden (optional; default: false)
| Name | Type | Description |
|---|---|---|
| $config | \Zend_Config | array | User-provided configuration |
| Exception | Description |
|---|---|
| \Zend_Session_SaveHandler_Exception |

_cascadeDelete(string $parentTableClassname, array $primaryKey) : intCalled by parent table's class during delete() method.
Inherited from: \Zend_Db_Table_Abstract::_cascadeDelete()| Name | Type | Description |
|---|---|---|
| $parentTableClassname | string | |
| $primaryKey | array |
| Type | Description |
|---|---|
| int | Number of affected rows |

_cascadeUpdate(string $parentTableClassname, array $oldPrimaryKey, array $newPrimaryKey) : intCalled by a row object for the parent table's class during save() method.
Inherited from: \Zend_Db_Table_Abstract::_cascadeUpdate()| Name | Type | Description |
|---|---|---|
| $parentTableClassname | string | |
| $oldPrimaryKey | array | |
| $newPrimaryKey | array |
| Type | Description |
|---|---|
| int |

_checkRequiredColumns() : voidCheck for required session table columns
| Exception | Description |
|---|---|
| \Zend_Session_SaveHandler_Exception |

_fetch(\Zend_Db_Table_Select $select) : array
| Name | Type | Description |
|---|---|---|
| $select | \Zend_Db_Table_Select | query options. |
| Type | Description |
|---|---|
| array | An array containing the row results in FETCH_ASSOC mode. |

_getExpirationTime(\Zend_Db_Table_Row_Abstract $row) : intRetrieve session expiration time
| Name | Type | Description |
|---|---|---|
| $row | \Zend_Db_Table_Row_Abstract |
| Type | Description |
|---|---|
| int |

_getLifetime(\Zend_Db_Table_Row_Abstract $row) : intRetrieve session lifetime considering Zend_Session_SaveHandler_DbTable::OVERRIDE_LIFETIME
| Name | Type | Description |
|---|---|---|
| $row | \Zend_Db_Table_Row_Abstract |
| Type | Description |
|---|---|
| int |

_getPrimary(string $id, string $type = null) : arrayRetrieve session table primary key values
| Name | Type | Description |
|---|---|---|
| $id | string | |
| $type | string | (optional; default: self::PRIMARY_TYPE_NUM) |
| Type | Description |
|---|---|
| array |

_getReferenceMapNormalized() : arrayReturns a normalized version of the reference map
Inherited from: \Zend_Db_Table_Abstract::_getReferenceMapNormalized()| Type | Description |
|---|---|
| array |

_order( $select, string | array $order) : \Zend_Db_Table_SelectGenerate ORDER clause from user-supplied string or array
Inherited from: \Zend_Db_Table_Abstract::_order()| Name | Type | Description |
|---|---|---|
| $select | ||
| $order | string | array | OPTIONAL An SQL ORDER clause. |
| Type | Description |
|---|---|
| \Zend_Db_Table_Select |

_setAdapter(mixed $db) : \Zend_Db_Table_Abstract| Name | Type | Description |
|---|---|---|
| $db | mixed | Either an Adapter object, or a string naming a Registry key |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract | Provides a fluent interface |

_setMetadataCache(mixed $metadataCache) : \Zend_Db_Table_AbstractSets the metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable().
Inherited from: \Zend_Db_Table_Abstract::_setMetadataCache()If $metadataCache is null, then no metadata cache is used. Since there is no opportunity to reload metadata after instantiation, this method need not be public, particularly because that it would have no effect results in unnecessary API complexity. To configure the metadata cache, use the metadataCache configuration option for the class constructor upon instantiation.
| Name | Type | Description |
|---|---|---|
| $metadataCache | mixed | Either a Cache object, or a string naming a Registry key |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract | Provides a fluent interface |

_setSequence(mixed $sequence) : \Zend_Db_Table_Adapter_AbstractSets the sequence member, which defines the behavior for generating primary key values in new rows.
Inherited from: \Zend_Db_Table_Abstract::_setSequence()- If this is a string, then the string names the sequence object.
- If this is boolean true, then the key uses an auto-incrementing or identity mechanism.
- If this is boolean false, then the key is user-defined. Use this for natural keys, for example.
| Name | Type | Description |
|---|---|---|
| $sequence | mixed |
| Type | Description |
|---|---|
| \Zend_Db_Table_Adapter_Abstract | Provides a fluent interface |

_setup() : voidCalls other protected methods for individual setup tasks and requirement checks
Calls other protected methods for individual tasks, to make it easier for a subclass to override part of the setup logic.

_setupAdapter(mixed $db) : \Zend_Db_Adapter_Abstract
| Name | Type | Description |
|---|---|---|
| $db | mixed | Either an Adapter object, or a string naming a Registry key |
| Type | Description |
|---|---|
| \Zend_Db_Adapter_Abstract |
| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

_setupDatabaseAdapter() : voidInitialize database adapter.
Inherited from: \Zend_Db_Table_Abstract::_setupDatabaseAdapter()| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

_setupMetadata() : boolean
If metadata cannot be loaded from cache, adapter's describeTable() method is called to discover metadata information. Returns true if and only if the metadata are loaded from cache.
| Type | Description |
|---|---|
| boolean |
| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

_setupMetadataCache(mixed $metadataCache) : \Zend_Cache_Core
| Name | Type | Description |
|---|---|---|
| $metadataCache | mixed | Either a Cache object, or a string naming a Registry key |
| Type | Description |
|---|---|
| \Zend_Cache_Core |
| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

_setupPrimaryAssignment() : voidInitialize session table primary key value assignment
| Exception | Description |
|---|---|
| \Zend_Session_SaveHandler_Exception |

_setupPrimaryKey() : voidInitialize primary key from metadata.
Inherited from: \Zend_Db_Table_Abstract::_setupPrimaryKey()If $_primary is not defined, discover primary keys from the information returned by describeTable().
| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

_setupTableName() : voidInitialize table and schema names
If the table name is not set in the class definition, use the class name itself as the table name.
A schema name provided with the table name (e.g., "schema.table") overrides any existing value for $this->_schema.
| Exception | Description |
|---|---|
| \Zend_Session_SaveHandler_Exception |

_where( $select, string | array $where) : \Zend_Db_Table_SelectGenerate WHERE clause from user-supplied string or array
Inherited from: \Zend_Db_Table_Abstract::_where()| Name | Type | Description |
|---|---|---|
| $select | ||
| $where | string | array | OPTIONAL An SQL WHERE clause. |
| Type | Description |
|---|---|
| \Zend_Db_Table_Select |

addReference(string $ruleKey, string | array $columns, string $refTableClass, string | array $refColumns, string $onDelete = null, string $onUpdate = null) : \Zend_Db_Table_AbstractAdd a reference to the reference map
Inherited from: \Zend_Db_Table_Abstract::addReference()| Name | Type | Description |
|---|---|---|
| $ruleKey | string | |
| $columns | string | array | |
| $refTableClass | string | |
| $refColumns | string | array | |
| $onDelete | string | |
| $onUpdate | string |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract |

createRow(array $data = array(), string $defaultSource = null) : \Zend_Db_Table_Row_AbstractFetches a new blank row (not from the database).
Inherited from: \Zend_Db_Table_Abstract::createRow()| Name | Type | Description |
|---|---|---|
| $data | array | OPTIONAL data to populate in the new row. |
| $defaultSource | string | OPTIONAL flag to force default values into new row |
| Type | Description |
|---|---|
| \Zend_Db_Table_Row_Abstract |

delete(array | string $where) : int
| Name | Type | Description |
|---|---|---|
| $where | array | string | SQL WHERE clause(s). |
| Type | Description |
|---|---|
| int | The number of rows deleted. |

destroy(string $id) : booleanDestroy session
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |

fetchAll(string | array | \Zend_Db_Table_Select $where = null, string | array $order = null, int $count = null, int $offset = null) : \Zend_Db_Table_Rowset_Abstract
Honors the Zend_Db_Adapter fetch mode.
| Name | Type | Description |
|---|---|---|
| $where | string | array | \Zend_Db_Table_Select | OPTIONAL An SQL WHERE clause or Zend_Db_Table_Select object. |
| $order | string | array | OPTIONAL An SQL ORDER clause. |
| $count | int | OPTIONAL An SQL LIMIT count. |
| $offset | int | OPTIONAL An SQL LIMIT offset. |
| Type | Description |
|---|---|
| \Zend_Db_Table_Rowset_Abstract | The row results per the Zend_Db_Adapter fetch mode. |

fetchNew() : \Zend_Db_Table_Row_AbstractFetches a new blank row (not from the database).
Inherited from: \Zend_Db_Table_Abstract::fetchNew()| Type | Description |
|---|---|
| \Zend_Db_Table_Row_Abstract |

fetchRow(string | array | \Zend_Db_Table_Select $where = null, string | array $order = null, int $offset = null) : \Zend_Db_Table_Row_Abstract | nullFetches one row in an object of type Zend_Db_Table_Row_Abstract, or returns null if no row matches the specified criteria.
Inherited from: \Zend_Db_Table_Abstract::fetchRow()| Name | Type | Description |
|---|---|---|
| $where | string | array | \Zend_Db_Table_Select | OPTIONAL An SQL WHERE clause or Zend_Db_Table_Select object. |
| $order | string | array | OPTIONAL An SQL ORDER clause. |
| $offset | int | OPTIONAL An SQL OFFSET value. |
| Type | Description |
|---|---|
| \Zend_Db_Table_Row_Abstract | null | The row results per the Zend_Db_Adapter fetch mode, or null if no row found. |

find() : \Zend_Db_Table_Rowset_Abstract
The argument specifies one or more primary key value(s). To find multiple rows by primary key, the argument must be an array.
This method accepts a variable number of arguments. If the table has a multi-column primary key, the number of arguments must be the same as the number of columns in the primary key. To find multiple rows in a table with a multi-column primary key, each argument must be an array with the same number of elements.
The find() method always returns a Rowset object, even if only one row was found.
| Type | Description |
|---|---|
| \Zend_Db_Table_Rowset_Abstract | Row(s) matching the criteria. |
| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

gc(int $maxlifetime) : trueGarbage Collection
| Name | Type | Description |
|---|---|---|
| $maxlifetime | int |
| Type | Description |
|---|---|
| true |

getAdapter() : \Zend_Db_Adapter_AbstractGets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Table object.
Inherited from: \Zend_Db_Table_Abstract::getAdapter()| Type | Description |
|---|---|
| \Zend_Db_Adapter_Abstract |

getDefaultAdapter() : \Zend_Db_Adapter_AbstractGets the default Zend_Db_Adapter_Abstract for all Zend_Db_Table objects.
Inherited from: \Zend_Db_Table_Abstract::getDefaultAdapter()| Type | Description |
|---|---|
| \Zend_Db_Adapter_Abstract | or null |

getDefaultMetadataCache() : \Zend_Cache_CoreGets the default metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable().
Inherited from: \Zend_Db_Table_Abstract::getDefaultMetadataCache()| Type | Description |
|---|---|
| \Zend_Cache_Core | or null |

getDefaultSource() : \unknownreturns the default source flag that determines where defaultSources come from
Inherited from: \Zend_Db_Table_Abstract::getDefaultSource()| Type | Description |
|---|---|
| \unknown |

getDefinition() : \Zend_Db_Table_Definition | null
| Type | Description |
|---|---|
| \Zend_Db_Table_Definition | null |

getDefinitionConfigName() : stringgetDefinitionConfigName()
Inherited from: \Zend_Db_Table_Abstract::getDefinitionConfigName()| Type | Description |
|---|---|
| string |

getDependentTables() : array| Type | Description |
|---|---|
| array |

getMetadataCache() : \Zend_Cache_CoreGets the metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable().
Inherited from: \Zend_Db_Table_Abstract::getMetadataCache()| Type | Description |
|---|---|
| \Zend_Cache_Core | or null |

getOverrideLifetime() : booleanRetrieve whether or not the lifetime of an existing session should be overridden
| Type | Description |
|---|---|
| boolean |

getReference(string $tableClassname, string $ruleKey = null) : array| Name | Type | Description |
|---|---|---|
| $tableClassname | string | |
| $ruleKey | string | OPTIONAL |
| Type | Description |
|---|---|
| array |
| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

getRowClass() : string| Type | Description |
|---|---|
| string |

getRowsetClass() : string| Type | Description |
|---|---|
| string |

getTableFromString( $tableName, $referenceTable = null) : void
| Name | Type | Description |
|---|---|---|
| $tableName | ||
| $referenceTable |

info(string $key = null) : mixed
You can elect to return only a part of this information by supplying its key name, otherwise all information is returned as an array.
| Name | Type | Description |
|---|---|---|
| $key | string | The specific info part to return OPTIONAL |
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

insert(array $data) : mixed
| Name | Type | Description |
|---|---|---|
| $data | array | Column-value pairs. |
| Type | Description |
|---|---|
| mixed | The primary key of the row inserted. |

isIdentity(string $column) : booleanCheck if the provided column is an identity of the table
Inherited from: \Zend_Db_Table_Abstract::isIdentity()| Name | Type | Description |
|---|---|---|
| $column | string |
| Type | Description |
|---|---|
| boolean |
| Exception | Description |
|---|---|
| \Zend_Db_Table_Exception |

metadataCacheInClass() : boolRetrieve flag indicating if metadata should be cached for duration of instance
Inherited from: \Zend_Db_Table_Abstract::metadataCacheInClass()| Type | Description |
|---|---|
| bool |

open(string $save_path, string $name) : booleanOpen Session
| Name | Type | Description |
|---|---|---|
| $save_path | string | |
| $name | string |
| Type | Description |
|---|---|
| boolean |

read(string $id) : stringRead session data
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| string |

select(bool $withFromPart = self::SELECT_WITHOUT_FROM_PART) : \Zend_Db_Table_SelectReturns an instance of a Zend_Db_Table_Select object.
Inherited from: \Zend_Db_Table_Abstract::select()| Name | Type | Description |
|---|---|---|
| $withFromPart | bool | Whether or not to include the from part of the select based on the table |
| Type | Description |
|---|---|
| \Zend_Db_Table_Select |

setDefaultAdapter(mixed $db = null) : voidSets the default Zend_Db_Adapter_Abstract for all Zend_Db_Table objects.
Inherited from: \Zend_Db_Table_Abstract::setDefaultAdapter()| Name | Type | Description |
|---|---|---|
| $db | mixed | Either an Adapter object, or a string naming a Registry key |

setDefaultMetadataCache(mixed $metadataCache = null) : voidSets the default metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable().
Inherited from: \Zend_Db_Table_Abstract::setDefaultMetadataCache()If $defaultMetadataCache is null, then no metadata cache is used by default.
| Name | Type | Description |
|---|---|---|
| $metadataCache | mixed | Either a Cache object, or a string naming a Registry key |

setDefaultSource(string $defaultSource = self::DEFAULT_NONE) : \Zend_Db_Table_Abstractset the defaultSource property - this tells the table class where to find default values
Inherited from: \Zend_Db_Table_Abstract::setDefaultSource()| Name | Type | Description |
|---|---|---|
| $defaultSource | string |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract |

setDefaultValues(array $defaultValues) : \Zend_Db_Table_Abstractset the default values for the table class
Inherited from: \Zend_Db_Table_Abstract::setDefaultValues()| Name | Type | Description |
|---|---|---|
| $defaultValues | array |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract |

setDefinition(\Zend_Db_Table_Definition $definition) : \Zend_Db_Table_Abstract
| Name | Type | Description |
|---|---|---|
| $definition | \Zend_Db_Table_Definition |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract |

setDefinitionConfigName( $definitionConfigName) : \Zend_Db_Table_AbstractsetDefinitionConfigName()
Inherited from: \Zend_Db_Table_Abstract::setDefinitionConfigName()| Name | Type | Description |
|---|---|---|
| $definitionConfigName |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract |

setDependentTables(array $dependentTables) : \Zend_Db_Table_Abstract| Name | Type | Description |
|---|---|---|
| $dependentTables | array |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract | Provides a fluent interface |

setLifetime(int $lifetime, boolean $overrideLifetime = null) : \Zend_Session_SaveHandler_DbTableSet session lifetime and optional whether or not the lifetime of an existing session should be overridden
$lifetime === false resets lifetime to session.gc_maxlifetime
| Name | Type | Description |
|---|---|---|
| $lifetime | int | |
| $overrideLifetime | boolean | (optional) |
| Type | Description |
|---|---|
| \Zend_Session_SaveHandler_DbTable |

setMetadataCacheInClass(bool $flag) : \Zend_Db_Table_AbstractIndicate whether metadata should be cached in the class for the duration of the instance
Inherited from: \Zend_Db_Table_Abstract::setMetadataCacheInClass()| Name | Type | Description |
|---|---|---|
| $flag | bool |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract |

setOptions(array $options) : \Zend_Db_Table_Abstract
| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract |

setOverrideLifetime(boolean $overrideLifetime) : \Zend_Session_SaveHandler_DbTableSet whether or not the lifetime of an existing session should be overridden
| Name | Type | Description |
|---|---|---|
| $overrideLifetime | boolean |
| Type | Description |
|---|---|
| \Zend_Session_SaveHandler_DbTable |

setReferences(array $referenceMap) : \Zend_Db_Table_Abstract| Name | Type | Description |
|---|---|---|
| $referenceMap | array |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract | Provides a fluent interface |

setRowClass(string $classname) : \Zend_Db_Table_Abstract| Name | Type | Description |
|---|---|---|
| $classname | string |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract | Provides a fluent interface |

setRowsetClass(string $classname) : \Zend_Db_Table_Abstract| Name | Type | Description |
|---|---|---|
| $classname | string |
| Type | Description |
|---|---|
| \Zend_Db_Table_Abstract | Provides a fluent interface |

update(array $data, array | string $where) : int
| Name | Type | Description |
|---|---|---|
| $data | array | Column-value pairs. |
| $where | array | string | An SQL WHERE clause, or an array of SQL WHERE clauses. |
| Type | Description |
|---|---|
| int | The number of rows updated. |