doctrine/DoctrineMongoODMModule — pull request #87 by hver (2013-09-24 15:37:01+00:00)
Title: Added connectionString option

For replica sets we need to specify mongodb server pool for the Doctrine\MongoDB\Connection. One can achive it by simply providing the connection string, e.g. 'mongodb://mngsrv1:27017,mngsrv2:27017/?replicaSet=rsname&readPreference=secondaryPreferred'.
It is not possible with current implementation of DoctrineMongoODMModule\Service\ConnectionFactory, because some values are prepended and appended to 'server' value. I would propose to add the option 'connectionString'. When this option is set, the factory will not try to build the connectionString and just pass the original over to Connection constructor. Of course, if user specify options they are still passed to Connection constructor and will overwrite the connectionString value if its possible (http://www.php.net/manual/en/mongoclient.construct.php).