public function getMongoClient()
    {
        if ($this->mongoClient) {
            return $this->mongoClient;
        }

        $this->mongoClient = new \MongoClient(
            $this->dsn,
            $this->connectOptions
        );
        
        return $this->mongoClient;
    }
public function getMongoClient()
    {
        if ($this->mongoClient) {
            return $this->mongoClient;
        }

        $this->mongoClient = new \MongoClient(
            $this->dsn,
            $this->connectOptions
        );
        
        return $this->mongoClient;
    }
public function getMongoClient ( ) { if ( $ this -> mongoClient ) { return $ this -> mongoClient ; } $ this -> mongoClient = new \ MongoClient ( $ this -> dsn , $ this -> connectOptions ) ; return $ this -> mongoClient ; }
Get mongo connection instance

@return \MongoClient
@throws Exception
Get mongo connection instance