PHP 8.5.0 Beta 3 available for testing

MongoDB\Driver\ServerApi::__construct

(mongodb >=1.10.0)

MongoDB\Driver\ServerApi::__constructCreate a new ServerApi instance

Description

final public MongoDB\Driver\ServerApi::__construct(string $version, ? bool $strict = null , ? bool $deprecationErrors = null )

Creates a new MongoDB\Driver\ServerApi instance used to declare an API version when creating a MongoDB\Driver\Manager .

Parameters

version

A server API version.

Supported API versions are provided as constants in MongoDB\Driver\ServerApi . The only supported API version is MongoDB\Driver\ServerApi::V1 .

strict

If the strict parameter is set to true , the server will yield an error for any command that is not part of the specified API version. If no value is provided, the server default value (false ) is used.

deprecationErrors

If the deprecationErrors parameter is set to true , the server will yield an error when using a command that is deprecated in the specified API version. If no value is provided, the server default value (false ) is used.

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /