[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 178 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
MongoDbSessionHandler:: (8 methods):
__construct()
open()
close()
destroy()
gc()
write()
read()
getCollection()
Class: MongoDbSessionHandler - X-Ref
MongoDB session handler.__construct($mongo, array $options) X-Ref |
Constructor. List of available options: * database: The name of the database [required] * collection: The name of the collection [required] * id_field: The field name for storing the session id [default: _id] * data_field: The field name for storing the session data [default: data] * time_field: The field name for storing the timestamp [default: time] * expiry_field: The field name for storing the expiry-timestamp [default: expires_at] It is strongly recommended to put an index on the `expiry_field` for garbage-collection. Alternatively it's possible to automatically expire the sessions in the database as described below: A TTL collections can be used on MongoDB 2.2+ to cleanup expired sessions automatically. Such an index can for example look like this: db.<session-collection>.ensureIndex( { "<expiry-field>": 1 }, { "expireAfterSeconds": 0 } ) More details on: http://docs.mongodb.org/manual/tutorial/expire-data/ If you use such an index, you can drop `gc_probability` to 0 since no garbage-collection is required. param: \Mongo|\MongoClient $mongo A MongoClient or Mongo instance param: array $options An associative array of field options |
open($savePath, $sessionName) X-Ref |
{@inheritdoc} |
close() X-Ref |
{@inheritdoc} |
destroy($sessionId) X-Ref |
{@inheritdoc} |
gc($maxlifetime) X-Ref |
{@inheritdoc} |
write($sessionId, $data) X-Ref |
{@inheritdoc} |
read($sessionId) X-Ref |
{@inheritdoc} |
getCollection() X-Ref |
Return a "MongoCollection" instance. return: \MongoCollection |
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |