Constructor.
\Mongo $mongo A "Mongo" instance:
array $options An associative array of field options:
\InvalidArgumentException When "database" or "collection" not provided
public function __construct(\Mongo $mongo, array $options) {
if (!isset($options['database']) || !isset($options['collection'])) {
throw new \InvalidArgumentException('You must provide the "database" and "collection" option for MongoDBSessionHandler');
}
$this->mongo = $mongo;
$this->options = array_merge(array(
'id_field' => 'sess_id',
'data_field' => 'sess_data',
'time_field' => 'sess_time',
), $options);
}