mongodb\validators\MongoIdValidator $forceFormat

$forceFormat public property Specifies the format, which validated attribute value should be converted to in case validation was successful. valid values are: 'string' - enforce value converted to plain string. 'object' - enforce value converted to \MongoId instance. If not set - no conversion will be performed, leaving attribute value intact. public string|null $forceFormat = null

mongodb\validators\MongoDateValidator $mongoDateAttribute

$mongoDateAttribute public property The name of the attribute to receive the parsing result as \MongoDate instance. When this property is not null and the validation is successful, the named attribute will receive the parsing result as \MongoDate instance. This can be the same attribute as the one being validated. If this is the case, the original value will be overwritten with the value after successful validation. public string $mongoDateAttribute = null

mongodb\Session readSession()

readSession() public method Session read handler. Do not call this method directly. public string readSession ( $id )$id string Session ID return string The session data

mongodb\Session writeSession()

writeSession() public method Session write handler. Do not call this method directly. public boolean writeSession ( $id, $data )$id string Session ID $data string Session data return boolean Whether session write is successful

mongodb\Session regenerateID()

regenerateID() public method Updates the current session ID with a newly generated one. Please refer to http://php.net/session_regenerate_id for more details. public void regenerateID ( $deleteOldSession = false )$deleteOldSession boolean Whether to delete the old associated session file or not.

mongodb\Session gcSession()

gcSession() public method Session GC (garbage collection) handler. Do not call this method directly. public boolean gcSession ( $maxLifetime )$maxLifetime integer The number of seconds after which data will be seen as 'garbage' and cleaned up. return boolean Whether session is GCed successfully

mongodb\Session $db

$db public property The MongoDB connection object or the application component ID of the MongoDB connection. After the Session object is created, if you want to change this property, you should only assign it with a MongoDB connection object. Starting from version 2.0.2, this can also be a configuration array for creating the object. public yii\mongodb\Connection|array|string $db = 'mongodb'

mongodb\Session init()

init() public method Initializes the Session component. This method will initialize the $db property to make sure it refers to a valid MongoDB connection. public void init ( )throws yii\base\InvalidConfigException if $db is invalid.

mongodb\Session destroySession()

destroySession() public method Session destroy handler. Do not call this method directly. public boolean destroySession ( $id )$id string Session ID return boolean Whether session is destroyed successfully

mongodb\Session $sessionCollection

$sessionCollection public property The name of the MongoDB collection that stores the session data. Please refer to yii\mongodb\Connection::getCollection() on how to specify this parameter. This collection is better to be pre-created with fields 'id' and 'expire' indexed. public string|array $sessionCollection = 'session'