(mongodb >=1.10.0)
MongoDB\Driver\ServerApi::__construct — 创建一个新的 ServerApi 实例
$version, ?bool $strict = null, ?bool $deprecationErrors = null)创建一个新的MongoDB\Driver\ServerApi 实例,用于在创建 MongoDB\Driver\Manager 时声明 API 版本。
version服务器 API 版本。
支持的API版本在MongoDB\Driver\ServerApi中以常量的形式提供。唯一支持的API版本是MongoDB\Driver\ServerApi::V1。
strict如果strict参数设置为true,则服务器将对任何不属于指定API版本的命令产生错误。如果未提供值,则使用服务器默认值(false)。
deprecationErrors如果deprecationErrors参数设置为true,则服务器在使用指定API版本中已弃用的命令时将产生错误。如果未提供值,则使用服务器默认值(false)。