src/Factory/MongoDBFactory.php
public function getAdapter(array $config)
    {
        $dsn = $this->getDsn();
        if (empty($dsn)) {
            $manager = new Manager(sprintf('mongodb://%s:%s', $config['host'], $config['port']));
        } else {
            $manager = new Manager($dsn->getDsn());
        }

        $collection = MongoDBCachePool::createCollection($manager, $config['namespace']);

        return new MongoDBCachePool($collection);
    }
public function getAdapter(array $config)
    {
        $dsn = $this->getDsn();
        if (empty($dsn)) {
            $manager = new Manager(sprintf('mongodb://%s:%s', $config['host'], $config['port']));
        } else {
            $manager = new Manager($dsn->getDsn());
        }

        $collection = MongoDBCachePool::createCollection($manager, $config['namespace']);

        return new MongoDBCachePool($collection);
    }
{@inheritdoc}