1599. Class

1599.1. Zend\Session\SaveHandler\MongoDB

MongoDB session save handler

1599.1.1. Methods

1599.1.1.1. __construct

__construct()

Constructor

Parameters:
  • Mongo|MongoClient
  • MongoDBOptions
Throws ZendSessionExceptionInvalidArgumentException:
 

1599.1.1.2. open

open()

Open session

Parameters:
  • string
  • string
Return type:

boolean

1599.1.1.3. close

close()

Close session

Return type:boolean

1599.1.1.4. read

read()

Read session data

Parameters:string
Return type:string

1599.1.1.5. write

write()

Write session data

Parameters:
  • string
  • string
Return type:

boolean

1599.1.1.6. destroy

destroy()

Destroy session

Parameters:string
Return type:boolean

1599.1.1.7. gc

gc()

Garbage collection

Note: MongoDB 2.2+ supports TTL collections, which may be used in place of this method by indexing the “modified” field with an “expireAfterSeconds” option. Regardless of whether TTL collections are used, consider indexing this field to make the remove query more efficient.

Parameters:int
Return type:boolean

Project Versions

Table Of Contents

Previous topic

1598. Class

Next topic

1600. Class

This Page