Commit 759cbdc7 authored by Neil Smith's avatar Neil Smith

Added support for passing driver options to MongoClient

Used mainly for configuring SSL details.
parent 8304a46f
......@@ -142,7 +142,15 @@ class Connection extends \Illuminate\Database\Connection {
$options['password'] = $config['password'];
}
return new MongoClient($dsn, $options);
// By default driver options is an empty array.
$driverOptions = array();
if (isset($config['driver_options']) && is_array($config['driver_options']))
{
$driverOptions = $config['driver_options'];
}
return new MongoClient($dsn, $options, $driverOptions);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment