public function __construct(MongoDB $db, $prefix = "fs", $chunks = null)
{
if ($chunks) {
trigger_error("The 'chunks' argument is deprecated and ignored", E_DEPRECATED);
}
if (empty($prefix)) {
throw new \Exception('MongoGridFS::__construct(): invalid prefix');
}
$this->database = $db;
$this->prefix = (string) $prefix;
$this->filesName = $prefix . '.files';
$this->chunksName = $prefix . '.chunks';
$this->chunks = $db->selectCollection($this->chunksName);
parent::__construct($db, $this->filesName);
}