\Zend_Session_SaveHandler_DbTable
Zend_Session_SaveHandler_DbTable
- Copyright: Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Session_SaveHandler_DbTable
extends Zend_Db_Table_Abstract
implements
Zend_Session_SaveHandler_Interface
{
- // constants
- 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';
- // members
- protected $_primaryAssignment = NULL;
- protected $_modifiedColumn = NULL;
- protected $_lifetimeColumn = NULL;
- protected $_dataColumn = NULL;
- protected boolean $_lifetime = false;
- protected boolean $_overrideLifetime = false;
- protected $_sessionSavePath;
- protected $_sessionName;
- // methods
- public void __construct()
- public void __destruct()
- public Zend_Session_SaveHandler_DbTable setLifetime()
- public int getLifetime()
- public Zend_Session_SaveHandler_DbTable setOverrideLifetime()
- public boolean getOverrideLifetime()
- public boolean open()
- public boolean close()
- public string read()
- public boolean write()
- public boolean destroy()
- public true gc()
- protected void _setup()
- protected void _setupTableName()
- protected void _setupPrimaryAssignment()
- protected void _checkRequiredColumns()
- protected array _getPrimary()
- protected int _getLifetime()
- protected int _getExpirationTime()
Hierarchy
Constants
Name | Value |
---|---|
PRIMARY_ASSIGNMENT | 'primaryAssignment' |
PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH | 'sessionSavePath' |
PRIMARY_ASSIGNMENT_SESSION_NAME | 'sessionName' |
PRIMARY_ASSIGNMENT_SESSION_ID | 'sessionId' |
MODIFIED_COLUMN | 'modifiedColumn' |
LIFETIME_COLUMN | 'lifetimeColumn' |
DATA_COLUMN | 'dataColumn' |
LIFETIME | 'lifetime' |
OVERRIDE_LIFETIME | 'overrideLifetime' |
PRIMARY_TYPE_NUM | 'PRIMARY_TYPE_NUM' |
PRIMARY_TYPE_PRIMARYNUM | 'PRIMARY_TYPE_PRIMARYNUM' |
PRIMARY_TYPE_ASSOC | 'PRIMARY_TYPE_ASSOC' |
PRIMARY_TYPE_WHERECLAUSE | 'PRIMARY_TYPE_WHERECLAUSE' |
Members
protected
- $_dataColumn
—
string
Session table data column - $_lifetime
—
int
Session lifetime - $_lifetimeColumn
—
string
Session table lifetime column - $_modifiedColumn
—
string
Session table last modification time column - $_overrideLifetime
—
boolean
Whether or not the lifetime of an existing session should be overridden - $_primaryAssignment
—
array
Session table primary key value assignment - $_sessionName
—
string
Session name - $_sessionSavePath
—
string
Session save path
Methods
protected
- _checkRequiredColumns() — Check for required session table columns
- _getExpirationTime() — Retrieve session expiration time
- _getLifetime() — Retrieve session lifetime considering Zend_Session_SaveHandler_DbTable::OVERRIDE_LIFETIME
- _getPrimary() — Retrieve session table primary key values
- _setup() — Calls other protected methods for individual setup tasks and requirement checks
- _setupPrimaryAssignment() — Initialize session table primary key value assignment
- _setupTableName() — Initialize table and schema names
public
- __construct() — Constructor
- __destruct() — Destructor
- close() — Close session
- destroy() — Destroy session
- gc() — Garbage Collection
- getLifetime() — Retrieve session lifetime
- getOverrideLifetime() — Retrieve whether or not the lifetime of an existing session should be overridden
- open() — Open Session
- read() — Read session data
- setLifetime() — Set session lifetime and optional whether or not the lifetime of an existing session should be overridden
- setOverrideLifetime() — Set whether or not the lifetime of an existing session should be overridden
- write() — Write session data