Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler::__construct
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]
Signature
public function __construct(MongoClient
$mongo,
array
$options )
Parameters
$mongo
— object- A MongoClient or Mongo instance
$options
— array- An associative array of field options
Errors/Exceptions
-
InvalidArgumentException
- When MongoClient or Mongo instance not provided
-
InvalidArgumentException
- When "database" or "collection" not provided