src/Service/Mongodb.php
public static function normalizeConfig(array $config)
    {
        $config = array_merge([
            'dsn' => sprintf('mongodb://%s:%s', ini_get('mongo.default_host'), ini_get('mongo.default_port')),
        ], $config);

        if (!isset($config['options'])) {
            $config['options'] = [];
        }

        $config['options'] = array_merge([
            'connectTimeoutMS' => 3000,
            'socketTimeoutMS' => 3000,
        ], $config['options']);

        return $config;
    }
public static function normalizeConfig(array $config)
    {
        $config = array_merge([
            'dsn' => sprintf('mongodb://%s:%s', ini_get('mongo.default_host'), ini_get('mongo.default_port')),
        ], $config);

        if (!isset($config['options'])) {
            $config['options'] = [];
        }

        $config['options'] = array_merge([
            'connectTimeoutMS' => 3000,
            'socketTimeoutMS' => 3000,
        ], $config['options']);

        return $config;
    }
格式化配置数据.

@param array $config
@static

@return array