@@ -83,14 +83,36 @@ To learn more about connection strings, see
8383:manual:`Connection Strings </reference/connection-string>` in the
8484Server manual.
8585
86- Create a MongoDB\Client
87- -----------------------
86+ Create a MongoDB\\ Client
87+ ------------------------
8888
89- To create a connection to MongoDB, pass your connection string when constructing
90- an instance of the ``MongoDB\Client`` class.
89+ To create a connection to MongoDB, construct a ``MongoDB\Client`` object.
90+ Pass the following parameters to the ``MongoDB\Client`` constructor:
9191
92- In the following example, the library uses a sample connection URI to connect to a MongoDB
93- deployment on port ``27017`` of ``localhost``:
92+ - ``$uri``: Sets the connection URI.
93+
94+ - ``$uriOptions``: *(Optional)* Sets URI options to configure how the client
95+ connects to MongoDB, including authentication credentials and
96+ server selection settings. If you set the same options in this
97+ parameter and in your connection string, the ``$uriOptions`` values
98+ take precedence. To view a full list of supported options, see
99+ the :ref:`php-connection-options` guide.
100+
101+ - ``$driverOptions``: *(Optional)* Sets options to configure the behavior of the
102+ underlying {+extension-short+}, including data encryption settings and certificate
103+ validation options for TLS connections. To view a full list of supported options,
104+ see :phpmethod:`MongoDB\Client::__construct()` in the API documentation.
105+
106+ Example
107+ ~~~~~~~
108+
109+ This example constructs a client and passes the following parameters:
110+
111+ - Connection URI, which connects to a MongoDB deployment on port ``27017``
112+ of ``localhost``
113+
114+ - URI options parameter, which instructs the {+library-short+} to wait
115+ ``10000`` milliseconds for server selection before generating an error
94116
95117.. literalinclude:: /includes/connect/client.php
96118 :language: php
0 commit comments