Zend Framework
1.12
|
Public Member Functions | |
__construct ($config) | |
Constructor. | |
__destruct () | |
Destructor. | |
setLifetime ($lifetime, $overrideLifetime=null) | |
Set session lifetime and optional whether or not the lifetime of an existing session should be overridden. | |
getLifetime () | |
Retrieve session lifetime. | |
setOverrideLifetime ($overrideLifetime) | |
Set whether or not the lifetime of an existing session should be overridden. | |
getOverrideLifetime () | |
Retrieve whether or not the lifetime of an existing session should be overridden. | |
open ($save_path, $name) | |
Open Session. | |
close () | |
Close session. | |
read ($id) | |
Read session data. | |
write ($id, $data) | |
Write session data. | |
destroy ($id) | |
Destroy session. | |
gc ($maxlifetime) | |
Garbage Collection. | |
![]() | |
__construct ($config=array()) | |
Constructor. | |
setOptions (Array $options) | |
setOptions() | |
setDefinition (Zend_Db_Table_Definition $definition) | |
setDefinition() | |
getDefinition () | |
getDefinition() | |
setDefinitionConfigName ($definitionConfigName) | |
setDefinitionConfigName() | |
getDefinitionConfigName () | |
getDefinitionConfigName() | |
setRowClass ($classname) | |
getRowClass () | |
setRowsetClass ($classname) | |
getRowsetClass () | |
addReference ($ruleKey, $columns, $refTableClass, $refColumns, $onDelete=null, $onUpdate=null) | |
Add a reference to the reference map. | |
setReferences (array $referenceMap) | |
getReference ($tableClassname, $ruleKey=null) | |
setDependentTables (array $dependentTables) | |
getDependentTables () | |
setDefaultSource ($defaultSource=self::DEFAULT_NONE) | |
set the defaultSource property - this tells the table class where to find default values | |
getDefaultSource () | |
returns the default source flag that determines where defaultSources come from | |
setDefaultValues (Array $defaultValues) | |
set the default values for the table class | |
getDefaultValues () | |
getAdapter () | |
Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Table object. | |
getMetadataCache () | |
Gets the metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable(). | |
setMetadataCacheInClass ($flag) | |
Indicate whether metadata should be cached in the class for the duration of the instance. | |
metadataCacheInClass () | |
Retrieve flag indicating if metadata should be cached for duration of instance. | |
init () | |
Initialize object. | |
info ($key=null) | |
Returns table information. | |
select ($withFromPart=self::SELECT_WITHOUT_FROM_PART) | |
Returns an instance of a Zend_Db_Table_Select object. | |
insert (array $data) | |
Inserts a new row. | |
isIdentity ($column) | |
Check if the provided column is an identity of the table. | |
update (array $data, $where) | |
Updates existing rows. | |
_cascadeUpdate ($parentTableClassname, array $oldPrimaryKey, array $newPrimaryKey) | |
Called by a row object for the parent table's class during save() method. | |
delete ($where) | |
Deletes existing rows. | |
_cascadeDelete ($parentTableClassname, array $primaryKey) | |
Called by parent table's class during delete() method. | |
find () | |
Fetches rows by primary key. | |
fetchAll ($where=null, $order=null, $count=null, $offset=null) | |
Fetches all rows. | |
fetchRow ($where=null, $order=null, $offset=null) | |
Fetches one row in an object of type Zend_Db_Table_Row_Abstract, or returns null if no row matches the specified criteria. | |
fetchNew () | |
Fetches a new blank row (not from the database). | |
createRow (array $data=array(), $defaultSource=null) | |
Fetches a new blank row (not from the database). | |
Public Attributes | |
const | PRIMARY_ASSIGNMENT = 'primaryAssignment' |
const | PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH = 'sessionSavePath' |
const | PRIMARY_ASSIGNMENT_SESSION_NAME = 'sessionName' |
const | PRIMARY_ASSIGNMENT_SESSION_ID = 'sessionId' |
const | MODIFIED_COLUMN = 'modifiedColumn' |
const | LIFETIME_COLUMN = 'lifetimeColumn' |
const | DATA_COLUMN = 'dataColumn' |
const | LIFETIME = 'lifetime' |
const | OVERRIDE_LIFETIME = 'overrideLifetime' |
const | PRIMARY_TYPE_NUM = 'PRIMARY_TYPE_NUM' |
const | PRIMARY_TYPE_PRIMARYNUM = 'PRIMARY_TYPE_PRIMARYNUM' |
const | PRIMARY_TYPE_ASSOC = 'PRIMARY_TYPE_ASSOC' |
const | PRIMARY_TYPE_WHERECLAUSE = 'PRIMARY_TYPE_WHERECLAUSE' |
![]() | |
const | ADAPTER = 'db' |
const | DEFINITION = 'definition' |
const | DEFINITION_CONFIG_NAME = 'definitionConfigName' |
const | SCHEMA = 'schema' |
const | NAME = 'name' |
const | PRIMARY = 'primary' |
const | COLS = 'cols' |
const | METADATA = 'metadata' |
const | METADATA_CACHE = 'metadataCache' |
const | METADATA_CACHE_IN_CLASS = 'metadataCacheInClass' |
const | ROW_CLASS = 'rowClass' |
const | ROWSET_CLASS = 'rowsetClass' |
const | REFERENCE_MAP = 'referenceMap' |
const | DEPENDENT_TABLES = 'dependentTables' |
const | SEQUENCE = 'sequence' |
const | COLUMNS = 'columns' |
const | REF_TABLE_CLASS = 'refTableClass' |
const | REF_COLUMNS = 'refColumns' |
const | ON_DELETE = 'onDelete' |
const | ON_UPDATE = 'onUpdate' |
const | CASCADE = 'cascade' |
const | CASCADE_RECURSE = 'cascadeRecurse' |
const | RESTRICT = 'restrict' |
const | SET_NULL = 'setNull' |
const | DEFAULT_NONE = 'defaultNone' |
const | DEFAULT_CLASS = 'defaultClass' |
const | DEFAULT_DB = 'defaultDb' |
const | SELECT_WITH_FROM_PART = true |
const | SELECT_WITHOUT_FROM_PART = false |
Protected Member Functions | |
_setup () | |
Calls other protected methods for individual setup tasks and requirement checks. | |
_setupTableName () | |
Initialize table and schema names. | |
_setupPrimaryAssignment () | |
Initialize session table primary key value assignment. | |
_checkRequiredColumns () | |
Check for required session table columns. | |
_getPrimary ($id, $type=null) | |
Retrieve session table primary key values. | |
_getLifetime (Zend_Db_Table_Row_Abstract $row) | |
Retrieve session lifetime considering Zend_Session_SaveHandler_DbTable::OVERRIDE_LIFETIME. | |
_getExpirationTime (Zend_Db_Table_Row_Abstract $row) | |
Retrieve session expiration time. | |
![]() | |
_setAdapter ($db) | |
_setMetadataCache ($metadataCache) | |
Sets the metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable(). | |
_setSequence ($sequence) | |
Sets the sequence member, which defines the behavior for generating primary key values in new rows. | |
_setup () | |
Turnkey for initialization of a table object. | |
_setupDatabaseAdapter () | |
Initialize database adapter. | |
_setupTableName () | |
Initialize table and schema names. | |
_setupMetadata () | |
Initializes metadata. | |
_getCols () | |
Retrieve table columns. | |
_setupPrimaryKey () | |
Initialize primary key from metadata. | |
_getReferenceMapNormalized () | |
Returns a normalized version of the reference map. | |
_where (Zend_Db_Table_Select $select, $where) | |
Generate WHERE clause from user-supplied string or array. | |
_order (Zend_Db_Table_Select $select, $order) | |
Generate ORDER clause from user-supplied string or array. | |
_fetch (Zend_Db_Table_Select $select) | |
Support method for fetching rows. | |
Protected Attributes | |
$_primaryAssignment = null | |
$_modifiedColumn = null | |
$_lifetimeColumn = null | |
$_dataColumn = null | |
$_lifetime = false | |
$_overrideLifetime = false | |
$_sessionSavePath | |
$_sessionName | |
![]() | |
$_definition = null | |
$_definitionConfigName = null | |
$_db | |
$_schema = null | |
$_name = null | |
$_cols | |
$_primary = null | |
$_identity = 1 | |
$_sequence = true | |
$_metadata = array() | |
$_metadataCache = null | |
$_metadataCacheInClass = true | |
$_rowClass = 'Zend_Db_Table_Row' | |
$_rowsetClass = 'Zend_Db_Table_Rowset' | |
$_referenceMap = array() | |
$_dependentTables = array() | |
$_defaultSource = self::DEFAULT_NONE | |
$_defaultValues = array() | |
Additional Inherited Members | |
![]() | |
static | setDefaultAdapter ($db=null) |
Sets the default Zend_Db_Adapter_Abstract for all Zend_Db_Table objects. | |
static | getDefaultAdapter () |
Gets the default Zend_Db_Adapter_Abstract for all Zend_Db_Table objects. | |
static | setDefaultMetadataCache ($metadataCache=null) |
Sets the default metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable(). | |
static | getDefaultMetadataCache () |
Gets the default metadata cache for information returned by Zend_Db_Adapter_Abstract::describeTable(). | |
static | getTableFromString ($tableName, Zend_Db_Table_Abstract $referenceTable=null) |
![]() | |
static | _setupAdapter ($db) |
static | _setupMetadataCache ($metadataCache) |
![]() | |
static | $_defaultDb |
static | $_defaultMetadataCache = null |
__construct | ( | $config | ) |
Constructor.
$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)
Zend_Config | array | $config | User-provided configuration |
Zend_Session_SaveHandler_Exception |
__destruct | ( | ) |
Destructor.
|
protected |
|
protected |
|
protected |
Retrieve session lifetime considering Zend_Session_SaveHandler_DbTable::OVERRIDE_LIFETIME.
Zend_Db_Table_Row_Abstract | $row |
|
protected |
Retrieve session table primary key values.
string | $id | |
string | $type | (optional; default: self::PRIMARY_TYPE_NUM) |
|
protected |
Calls other protected methods for individual setup tasks and requirement checks.
|
protected |
Initialize session table primary key value assignment.
Zend_Session_SaveHandler_Exception |
|
protected |
close | ( | ) |
destroy | ( | $id | ) |
gc | ( | $maxlifetime | ) |
Garbage Collection.
int | $maxlifetime |
Implements Zend_Session_SaveHandler_Interface.
getLifetime | ( | ) |
Retrieve session lifetime.
getOverrideLifetime | ( | ) |
Retrieve whether or not the lifetime of an existing session should be overridden.
open | ( | $save_path, | |
$name | |||
) |
Open Session.
string | $save_path | |
string | $name |
Implements Zend_Session_SaveHandler_Interface.
read | ( | $id | ) |
Read session data.
string | $id |
Implements Zend_Session_SaveHandler_Interface.
setLifetime | ( | $lifetime, | |
$overrideLifetime = null |
|||
) |
Set session lifetime and optional whether or not the lifetime of an existing session should be overridden.
$lifetime === false resets lifetime to session.gc_maxlifetime
int | $lifetime | |
boolean | $overrideLifetime | (optional) |
setOverrideLifetime | ( | $overrideLifetime | ) |
Set whether or not the lifetime of an existing session should be overridden.
boolean | $overrideLifetime |
write | ( | $id, | |
$data | |||
) |
Write session data.
string | $id | |
string | $data |
Implements Zend_Session_SaveHandler_Interface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const DATA_COLUMN = 'dataColumn' |
const LIFETIME = 'lifetime' |
const LIFETIME_COLUMN = 'lifetimeColumn' |
const MODIFIED_COLUMN = 'modifiedColumn' |
const OVERRIDE_LIFETIME = 'overrideLifetime' |
const PRIMARY_ASSIGNMENT = 'primaryAssignment' |
const PRIMARY_ASSIGNMENT_SESSION_ID = 'sessionId' |
const PRIMARY_ASSIGNMENT_SESSION_NAME = 'sessionName' |
const PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH = 'sessionSavePath' |
const PRIMARY_TYPE_ASSOC = 'PRIMARY_TYPE_ASSOC' |
const PRIMARY_TYPE_NUM = 'PRIMARY_TYPE_NUM' |
const PRIMARY_TYPE_PRIMARYNUM = 'PRIMARY_TYPE_PRIMARYNUM' |
const PRIMARY_TYPE_WHERECLAUSE = 'PRIMARY_TYPE_WHERECLAUSE' |