void HHVM_METHOD(MongoDBDriverManager, __construct, const String &dsn, const Array &options, const Array &driverOptions)
{
MongoDBDriverManagerData* data = Native::data<MongoDBDriverManagerData>(this_);
mongoc_uri_t *uri;
mongoc_client_t *client;
uri = hippo_mongo_driver_manager_make_uri(dsn.c_str(), options);
client = mongoc_client_new_from_uri(uri);
if (!client) {
throw MongoDriver::Utils::throwRunTimeException("Failed to create Manager from URI: '" + dsn + "'");
}
data->m_client = client;
hippo_mongo_driver_manager_apply_ssl_opts(data->m_client, driverOptions);
hippo_mongo_driver_manager_apply_rp(data->m_client, options);
hippo_mongo_driver_manager_apply_wc(data->m_client, options);
}