php8.5
Home/ Manual/ driver / clientencryption/ MongoDB\Driver\ClientEncryption::__construct

MongoDB\Driver\ClientEncryption::__construct

PHP function Edit on GitHub ✎

(mongodb >=1.14.0)

Create a new ClientEncryption object

Description

MongoDB\Driver\ClientEncryption::__construct(array $options)

Constructs a new MongoDB\Driver\ClientEncryption object with the specified options.

Parameters

options
OptionTypeDescription
keyVaultClientMongoDB\Driver\ManagerThe Manager used to route data key queries. This option is required (unlike with MongoDB\Driver\Manager::createClientEncryption()).

Errors/Exceptions

  • Throws MongoDB\Driver\Exception\RuntimeException if the extension was compiled without libmongocrypt support

Changelog

VersionDescription
PECL mongodb 1.16.0The AWS KMS provider for client-side encryption now accepts a "sessionToken" option, which can be used to authenticate with temporary AWS credentials.Added "tlsDisableOCSPEndpointCheck" to the "tlsOptions" option.If an empty document is specified for the "azure" or "gcp" KMS provider, the driver will attempt to configure the provider using Automatic Credentials.
PECL mongodb 1.15.0If an empty document is specified for the "aws" KMS provider, the driver will attempt to configure the provider using Automatic Credentials.

See Also

Source: reference/mongodb/mongodb/driver/clientencryption/construct.xml · from the official PHP manual (php/doc-en)