coen-hyde/Shanty-Mongo — pull request #109 by tonymillion (2013-01-14 08:13:13+00:00)
Title: Replaces old Master / Slave stuff with a simple connection setup

You can now setup connections to replica sets like:

```

$connection = new Shanty_Mongo_Connection("mongodb://user:password@db.yourserver.com:27017");

$connection->setSlaveOkay(true);	// optional to offload reads to slaves

Shanty_Mongo::addConnection($connection);
```

as per the php-mongo docs your connection string can look like
"mongodb://db1.example.net,db2.example.net:2500/?replicaSet=test" or you can pass the replica set in as an array in a second param!

addConnection optionally takes a connection group just like the old stuff!

This fixes the problem with replica set connections I saw previously.