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 license@zend.com so we can send you a copy immediately.
Zend_Session_SaveHandler_DbTable
PRIMARY_ASSIGNMENT = 'primaryAssignment'
Details PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH = 'sessionSavePath'
Details PRIMARY_ASSIGNMENT_SESSION_NAME = 'sessionName'
Details PRIMARY_ASSIGNMENT_SESSION_ID = 'sessionId'
Details MODIFIED_COLUMN = 'modifiedColumn'
Details LIFETIME_COLUMN = 'lifetimeColumn'
Details DATA_COLUMN = 'dataColumn'
Details LIFETIME = 'lifetime'
Details OVERRIDE_LIFETIME = 'overrideLifetime'
Details PRIMARY_TYPE_NUM = 'PRIMARY_TYPE_NUM'
Details PRIMARY_TYPE_PRIMARYNUM = 'PRIMARY_TYPE_PRIMARYNUM'
Details PRIMARY_TYPE_ASSOC = 'PRIMARY_TYPE_ASSOC'
Details PRIMARY_TYPE_WHERECLAUSE = 'PRIMARY_TYPE_WHERECLAUSE'
Detailsstring $_dataColumn = 'null'Session table data column
Detailsint $_lifetime = 'false'Session lifetime
Detailsstring $_lifetimeColumn = 'null'Session table lifetime column
Detailsstring $_modifiedColumn = 'null'Session table last modification time column
Detailsboolean $_overrideLifetime = 'false'Whether or not the lifetime of an existing session should be overridden
Detailsarray $_primaryAssignment = 'null'Session table primary key value assignment
Detailsstring $_sessionName = ''Session name
Detailsstring $_sessionSavePath = ''Session save path
Details__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)
Details__destruct(
)
:
voidDestructor
Details_checkRequiredColumns(
)
:
voidCheck for required session table columns
Details_getExpirationTime(
Zend_Db_Table_Row_Abstract $row
)
:
intRetrieve session expiration time
Details_getLifetime(
Zend_Db_Table_Row_Abstract $row
)
:
intRetrieve session lifetime considering Zend_Session_SaveHandler_DbTable::OVERRIDE_LIFETIME
Details_getPrimary(
string $id, string $type
=
null
)
:
arrayRetrieve session table primary key values
Details_setup(
)
:
voidCalls other protected methods for individual setup tasks and requirement checks
Details_setupPrimaryAssignment(
)
:
voidInitialize session table primary key value assignment
Details_setupTableName(
)
:
voidInitialize table and schema names
Detailsclose(
)
:
booleanClose session
Detailsdestroy(
string $id
)
:
booleanDestroy session
Detailsgc(
int $maxlifetime
)
:
trueGarbage Collection
DetailsgetLifetime(
)
:
intRetrieve session lifetime
DetailsgetOverrideLifetime(
)
:
booleanRetrieve whether or not the lifetime of an existing session should be overridden
Detailsopen(
string $save_path, string $name
)
:
booleanOpen Session
Detailsread(
string $id
)
:
stringRead session data
DetailssetLifetime(
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
DetailssetOverrideLifetime(
boolean $overrideLifetime
)
:
Zend_Session_SaveHandler_DbTableSet whether or not the lifetime of an existing session should be overridden
Detailswrite(
string $id, string $data
)
:
booleanWrite session data
Details