array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'mongodb-driver-serverapi.construct.php', 1 => 'MongoDB\\Driver\\ServerApi::__construct', ), 'up' => array ( 0 => 'class.mongodb-driver-serverapi.php', 1 => 'MongoDB\\Driver\\ServerApi', ), 'prev' => array ( 0 => 'mongodb-driver-serverapi.bsonserialize.php', 1 => 'MongoDB\\Driver\\ServerApi::bsonSerialize', ), 'next' => array ( 0 => 'mongodb-driver-serverapi.serialize.php', 1 => 'MongoDB\\Driver\\ServerApi::serialize', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/mongodb/driver/serverapi/construct.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(mongodb >=1.10.0)
MongoDB\Driver\ServerApi::__construct — Create a new ServerApi instance
$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.
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.