protected function setupMongo($dsn, $options)
    {
        try {
            $this->client = new \MongoClient($dsn, $options);
            $this->dbh    = $this->client->selectDB($this->dbName);
        } catch (\MongoConnectionException $e) {
            throw new ModuleException($this, sprintf('Failed to open Mongo connection: %s', $e->getMessage()));
        }
    }
protected function setupMongo($dsn, $options)
    {
        try {
            $this->client = new \MongoClient($dsn, $options);
            $this->dbh    = $this->client->selectDB($this->dbName);
        } catch (\MongoConnectionException $e) {
            throw new ModuleException($this, sprintf('Failed to open Mongo connection: %s', $e->getMessage()));
        }
    }
protected function setupMongo ( $ dsn , $ options ) { try { $ this -> client = new \ MongoClient ( $ dsn , $ options ) ; $ this -> dbh = $ this -> client -> selectDB ( $ this -> dbName ) ; } catch ( \ MongoConnectionException $ e ) { throw new ModuleException ( $ this , sprintf ( 'Failed to open Mongo connection: %s' , $ e -> getMessage ( ) ) ) ; } }
Connect to the Mongo server using the legacy mongo extension.
Connect to the Mongo server using the legacy mongo extension .