|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct ($config) | |
| __destruct () | |
| setLifetime ($lifetime, $overrideLifetime=null) | |
| getLifetime () | |
| setOverrideLifetime ($overrideLifetime) | |
| getOverrideLifetime () | |
| open ($save_path, $name) | |
| close () | |
| read ($id) | |
| write ($id, $data) | |
| destroy ($id) | |
| gc ($maxlifetime) | |
Public Member Functions inherited from Zend_Db_Table_Abstract | |
| __construct ($config=array()) | |
| setOptions (Array $options) | |
| setDefinition (Zend_Db_Table_Definition $definition) | |
| getDefinition () | |
| setDefinitionConfigName ($definitionConfigName) | |
| getDefinitionConfigName () | |
| setRowClass ($classname) | |
| getRowClass () | |
| setRowsetClass ($classname) | |
| getRowsetClass () | |
| addReference ($ruleKey, $columns, $refTableClass, $refColumns, $onDelete=null, $onUpdate=null) | |
| setReferences (array $referenceMap) | |
| getReference ($tableClassname, $ruleKey=null) | |
| setDependentTables (array $dependentTables) | |
| getDependentTables () | |
| setDefaultSource ($defaultSource=self::DEFAULT_NONE) | |
| getDefaultSource () | |
| setDefaultValues (Array $defaultValues) | |
| getDefaultValues () | |
| getAdapter () | |
| getMetadataCache () | |
| setMetadataCacheInClass ($flag) | |
| metadataCacheInClass () | |
| init () | |
| info ($key=null) | |
| select ($withFromPart=self::SELECT_WITHOUT_FROM_PART) | |
| insert (array $data) | |
| isIdentity ($column) | |
| update (array $data, $where) | |
| _cascadeUpdate ($parentTableClassname, array $oldPrimaryKey, array $newPrimaryKey) | |
| delete ($where) | |
| _cascadeDelete ($parentTableClassname, array $primaryKey) | |
| find () | |
| fetchAll ($where=null, $order=null, $count=null, $offset=null) | |
| fetchRow ($where=null, $order=null, $offset=null) | |
| fetchNew () | |
| createRow (array $data=array(), $defaultSource=null) | |
Data Fields | |
| 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' |
Data Fields inherited from Zend_Db_Table_Abstract | |
| 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 () | |
| _setupTableName () | |
| _setupPrimaryAssignment () | |
| _checkRequiredColumns () | |
| _getPrimary ($id, $type=null) | |
| _getLifetime (Zend_Db_Table_Row_Abstract $row) | |
| _getExpirationTime (Zend_Db_Table_Row_Abstract $row) | |
Protected Member Functions inherited from Zend_Db_Table_Abstract | |
| _setAdapter ($db) | |
| _setMetadataCache ($metadataCache) | |
| _setSequence ($sequence) | |
| _setup () | |
| _setupDatabaseAdapter () | |
| _setupTableName () | |
| _setupMetadata () | |
| _getCols () | |
| _setupPrimaryKey () | |
| _getReferenceMapNormalized () | |
| _where (Zend_Db_Table_Select $select, $where) | |
| _order (Zend_Db_Table_Select $select, $order) | |
| _fetch (Zend_Db_Table_Select $select) | |
Protected Attributes | |
| $_primaryAssignment = null | |
| $_modifiedColumn = null | |
| $_lifetimeColumn = null | |
| $_dataColumn = null | |
| $_lifetime = false | |
| $_overrideLifetime = false | |
| $_sessionSavePath | |
| $_sessionName | |
Protected Attributes inherited from Zend_Db_Table_Abstract | |
| $_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 Public Member Functions inherited from Zend_Db_Table_Abstract | |
| static | setDefaultAdapter ($db=null) |
| static | getDefaultAdapter () |
| static | setDefaultMetadataCache ($metadataCache=null) |
| static | getDefaultMetadataCache () |
| static | getTableFromString ($tableName, Zend_Db_Table_Abstract $referenceTable=null) |
Static Protected Member Functions inherited from Zend_Db_Table_Abstract | |
| static | _setupAdapter ($db) |
| static | _setupMetadataCache ($metadataCache) |
Static Protected Attributes inherited from Zend_Db_Table_Abstract | |
| static | $_defaultDb |
| static | $_defaultMetadataCache = null |
Definition at line 52 of file DbTable.php.
| __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 |
Definition at line 163 of file DbTable.php.
| __destruct | ( | ) |
|
protected |
Check for required session table columns
| Zend_Session_SaveHandler_Exception |
Definition at line 478 of file DbTable.php.
|
protected |
Retrieve session expiration time
| Zend_Db_Table_Row_Abstract | $row |
Definition at line 587 of file DbTable.php.
|
protected |
Retrieve session lifetime considering Zend_Session_SaveHandler_DbTable::OVERRIDE_LIFETIME
| Zend_Db_Table_Row_Abstract | $row |
Definition at line 570 of file DbTable.php.
|
protected |
Retrieve session table primary key values
| string | $id | |
| string | $type | (optional; default: self::PRIMARY_TYPE_NUM) |
Definition at line 517 of file DbTable.php.
|
protected |
Calls other protected methods for individual setup tasks and requirement checks
Definition at line 401 of file DbTable.php.
|
protected |
Initialize session table primary key value assignment
| Zend_Session_SaveHandler_Exception |
Definition at line 439 of file DbTable.php.
|
protected |
Initialize table and schema names
| Zend_Session_SaveHandler_Exception |
Definition at line 417 of file DbTable.php.
| close | ( | ) |
Close session
Implements Zend_Session_SaveHandler_Interface.
Definition at line 303 of file DbTable.php.
| destroy | ( | $id | ) |
Destroy session
| string | $id |
Implements Zend_Session_SaveHandler_Interface.
Definition at line 370 of file DbTable.php.
| gc | ( | $maxlifetime | ) |
Garbage Collection
| int | $maxlifetime |
Implements Zend_Session_SaveHandler_Interface.
Definition at line 387 of file DbTable.php.
| getLifetime | ( | ) |
| getOverrideLifetime | ( | ) |
Retrieve whether or not the lifetime of an existing session should be overridden
Definition at line 278 of file DbTable.php.
| open | ( | $save_path, | |
| $name | |||
| ) |
Open Session
| string | $save_path | |
| string | $name |
Implements Zend_Session_SaveHandler_Interface.
Definition at line 290 of file DbTable.php.
| read | ( | $id | ) |
Read session data
| string | $id |
Implements Zend_Session_SaveHandler_Interface.
Definition at line 314 of file DbTable.php.
| 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) |
Definition at line 229 of file DbTable.php.
| setOverrideLifetime | ( | $overrideLifetime | ) |
Set whether or not the lifetime of an existing session should be overridden
| boolean | $overrideLifetime |
Definition at line 266 of file DbTable.php.
| write | ( | $id, | |
| $data | |||
| ) |
Write session data
| string | $id | |
| string | $data |
Implements Zend_Session_SaveHandler_Interface.
Definition at line 338 of file DbTable.php.
|
protected |
Definition at line 99 of file DbTable.php.
|
protected |
Definition at line 106 of file DbTable.php.
|
protected |
Definition at line 92 of file DbTable.php.
|
protected |
Definition at line 85 of file DbTable.php.
|
protected |
Definition at line 113 of file DbTable.php.
|
protected |
Definition at line 78 of file DbTable.php.
|
protected |
Definition at line 127 of file DbTable.php.
|
protected |
Definition at line 120 of file DbTable.php.
| const DATA_COLUMN = 'dataColumn' |
Definition at line 63 of file DbTable.php.
| const LIFETIME = 'lifetime' |
Definition at line 65 of file DbTable.php.
| const LIFETIME_COLUMN = 'lifetimeColumn' |
Definition at line 62 of file DbTable.php.
| const MODIFIED_COLUMN = 'modifiedColumn' |
Definition at line 61 of file DbTable.php.
| const OVERRIDE_LIFETIME = 'overrideLifetime' |
Definition at line 66 of file DbTable.php.
| const PRIMARY_ASSIGNMENT = 'primaryAssignment' |
Definition at line 56 of file DbTable.php.
| const PRIMARY_ASSIGNMENT_SESSION_ID = 'sessionId' |
Definition at line 59 of file DbTable.php.
| const PRIMARY_ASSIGNMENT_SESSION_NAME = 'sessionName' |
Definition at line 58 of file DbTable.php.
| const PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH = 'sessionSavePath' |
Definition at line 57 of file DbTable.php.
| const PRIMARY_TYPE_ASSOC = 'PRIMARY_TYPE_ASSOC' |
Definition at line 70 of file DbTable.php.
| const PRIMARY_TYPE_NUM = 'PRIMARY_TYPE_NUM' |
Definition at line 68 of file DbTable.php.
| const PRIMARY_TYPE_PRIMARYNUM = 'PRIMARY_TYPE_PRIMARYNUM' |
Definition at line 69 of file DbTable.php.
| const PRIMARY_TYPE_WHERECLAUSE = 'PRIMARY_TYPE_WHERECLAUSE' |
Definition at line 71 of file DbTable.php.