public function readSession($id)
{
$collection = $this->db->getCollection($this->sessionCollection);
$condition = ['id' => $id, 'expire' => ['$gt' => time()]];
if (isset($this->readCallback)) {
$doc = $collection->findOne($condition);
return $doc === null ? '' : $this->extractData($doc);
}
$doc = $collection->findOne($condition, ['data' => 1, '_id' => 0]);
return isset($doc['data']) ? $doc['data'] : '';
}