Skip to content

Commit d777f5f

Browse files
committed
PHPLIB-512: Document createClientEncryption method
1 parent 5e76ca5 commit d777f5f

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source:
2+
file: apiargs-common-param.yaml
3+
ref: $options
4+
...

docs/reference/class/MongoDBClient.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Methods
3030

3131
/reference/method/MongoDBClient__construct
3232
/reference/method/MongoDBClient__get
33+
/reference/method/MongoDBClient-createClientEncryption
3334
/reference/method/MongoDBClient-dropDatabase
3435
/reference/method/MongoDBClient-getManager
3536
/reference/method/MongoDBClient-getReadConcern
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
=========================================
2+
MongoDB\\Client::createClientEncryption()
3+
=========================================
4+
5+
.. default-domain:: mongodb
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
Definition
14+
----------
15+
16+
.. phpmethod:: MongoDB\\Client::createClientEncryption()
17+
18+
Returns a :php:`MongoDB\\Driver\\ClientEncryption <class.mongodb-driver-clientencryption>`
19+
object for manual encryption and decryption of values.
20+
21+
.. code-block:: php
22+
23+
function createClientEncryption(array $options): MongoDB\Driver\ClientEncryption
24+
25+
This method has the following parameters:
26+
27+
.. include:: /includes/apiargs/MongoDBClient-method-createClientEncryption-param.rst
28+
29+
The ``$options`` parameter supports all options documented in the
30+
:php:`extension manual <manual/en/mongodb-driver-manager.createclientencryption.php>`.
31+
For the ``keyVaultClient`` option, an instance of :phpclass:`MongoDB\\Client`
32+
is automatically unwrapped and the :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>`
33+
instance is passed to the extension.
34+
35+
Return Values
36+
-------------
37+
38+
A :php:`MongoDB\\Driver\\ClientEncryption <class.mongodb-driver-clientencryption>`
39+
instance which can be used to encrypt and decrypt values.
40+
41+
Errors/Exceptions
42+
-----------------
43+
44+
.. include:: /includes/extracts/error-invalidargumentexception.rst
45+
.. include:: /includes/extracts/error-driver-invalidargumentexception.rst
46+
47+
See Also
48+
--------
49+
50+
- :php:`MongoDB\\Driver\\Manager::createClientEncryption()
51+
<manual/en/mongodb-driver-manager.createclientencryption.php>`

0 commit comments

Comments
 (0)