@@ -118,17 +118,16 @@ Timeout Options
118
118
:stub-columns: 1
119
119
120
120
* - Connection Option
121
- - Data Type
122
- - Syntax
121
+ - Description
123
122
124
123
* - :manual:`connectTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.connecttimeoutms>`
125
- - {+int-data-type+}
124
+ - | **Data Type**: {+int-data-type+}
126
125
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'connectTimeoutMS' => 20000 ];``
127
126
| **Connection URI Example**: ``connectTimeoutMS=20000``
128
127
129
128
* - :manual:`socketTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.sockettimeoutms>`
130
- - {+int-data-type+}
131
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'socketTimeoutMS' => 400000 ];``
129
+ - | **Data Type**: {+int-data-type+}
130
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'socketTimeoutMS' => 400000 ];``
132
131
| **Connection URI Example**: ``socketTimeoutMS=400000``
133
132
134
133
.. _php-compression-options:
@@ -141,17 +140,16 @@ Compression Options
141
140
:stub-columns: 1
142
141
143
142
* - Connection Option
144
- - Data Type
145
- - Syntax
143
+ - Description
146
144
147
145
* - :manual:`compressors </reference/connection-string/#mongodb-urioption-urioption.compressors>`
148
- - {+string-data-type+}
149
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'compressors' => 'snappy,zstd,zlib' ];``
146
+ - | **Data Type**: {+string-data-type+}
147
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'compressors' => 'snappy,zstd,zlib' ];``
150
148
| **Connection URI Example**: ``compressors=snappy,zstd,zlib``
151
149
152
150
* - :manual:`zlibCompressionLevel </reference/connection-string/#mongodb-urioption-urioption.zlibcompressionlevel>`
153
- - {+int-data-type+}
154
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'zlibCompressionLevel' => 3 ];``
151
+ - | **Data Type**: {+int-data-type+}
152
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'zlibCompressionLevel' => 3 ];``
155
153
| **Connection URI Example**: ``zlibCompressionLevel=3``
156
154
157
155
Connection Pool Options
@@ -162,17 +160,16 @@ Connection Pool Options
162
160
:stub-columns: 1
163
161
164
162
* - Connection Option
165
- - Data Type
166
- - Syntax
163
+ - Description
167
164
168
165
* - :manual:`maxPoolSize </reference/connection-string/#mongodb-urioption-urioption.maxpoolsize>`
169
- - {+int-data-type+}
170
- - | **MongoDB\\Client Example**: N/A
166
+ - | **Data Type**: {+int-data-type+}
167
+ | **MongoDB\\Client Example**: N/A
171
168
| **Connection URI Example**: ``maxPoolSize=75``
172
169
173
170
* - :manual:`waitQueueTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.waitqueuetimeoutms>`
174
- - {+int-data-type+}
175
- - | **MongoDB\\Client Example**: N/A
171
+ - | **Data Type**: {+int-data-type+}
172
+ | **MongoDB\\Client Example**: N/A
176
173
| **Connection URI Example**: ``waitQueueTimeoutMS=10000``
177
174
178
175
Write Concern Options
@@ -183,22 +180,21 @@ Write Concern Options
183
180
:stub-columns: 1
184
181
185
182
* - Connection Option
186
- - Data Type
187
- - Syntax
183
+ - Description
188
184
189
185
* - :manual:`w </reference/connection-string/#mongodb-urioption-urioption.w>`
190
- - {+string-data-type+}
191
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'w' => 'majority' ];``
186
+ - | **Data Type**: {+string-data-type+}
187
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'w' => 'majority' ];``
192
188
| **Connection URI Example**: ``w=majority``
193
189
194
190
* - :manual:`wTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.wtimeoutms>`
195
- - {+int-data-type+}
196
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'wTimeoutMS' => 10000 ];``
191
+ - | **Data Type**: {+int-data-type+}
192
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'wTimeoutMS' => 10000 ];``
197
193
| **Connection URI Example**: ``wTimeoutMS=10000``
198
194
199
195
* - :manual:`journal </reference/connection-string/#mongodb-urioption-urioption.journal>`
200
- - {+bool-data-type+}
201
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'journal' => true ];``
196
+ - | **Data Type**: {+bool-data-type+}
197
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'journal' => true ];``
202
198
| **Connection URI Example**: ``journal=true``
203
199
204
200
Read Concern Options
@@ -209,12 +205,11 @@ Read Concern Options
209
205
:stub-columns: 1
210
206
211
207
* - Connection Option
212
- - Data Type
213
- - Syntax
208
+ - Description
214
209
215
210
* - :manual:`readConcernLevel </reference/connection-string/#mongodb-urioption-urioption.readconcernlevel>`
216
- - {+string-data-type+}
217
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'readConcernLevel' => 'majority' ];``
211
+ - | **Data Type**: {+string-data-type+}
212
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'readConcernLevel' => 'majority' ];``
218
213
| **Connection URI Example**: ``readConcernLevel=majority``
219
214
220
215
Read Preference Options
@@ -223,68 +218,49 @@ Read Preference Options
223
218
.. list-table::
224
219
:header-rows: 1
225
220
:stub-columns: 1
226
- :width: 20 20 60
227
221
228
222
* - Connection Option
229
- - Data Type
230
- - Syntax
223
+ - Description
231
224
232
225
* - :manual:`readPreference </reference/connection-string/#mongodb-urioption-urioption.readpreference>`
233
- - ``int`` or ``string``
234
- - **MongoDB\\Client Example**: ``$uriOptions = [ 'readPreference' => 'secondaryPreferred' ];``
235
-
236
- **Connection URI Example**: ``readPreference=secondaryPreferred``
237
-
238
- For a complete list of the available values for this option, see the
239
- `MongoDB\\Driver\\ReadPreference <https://www.php.net/manual/en/class.mongodb-driver-readpreference.php>`__
240
- API documentation.
226
+ - | **Data Type**: `MongoDB\\Driver\\ReadPreference <https://www.php.net/manual/en/class.mongodb-driver-readpreference.php>`__
227
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'readPreference' => 'secondaryPreferred' ];``
228
+ |
229
+ | **Connection URI Example**: ``readPreference=secondaryPreferred``
241
230
242
231
* - :manual:`maxStalenessSeconds </reference/connection-string/#mongodb-urioption-urioption.maxstalenessseconds>`
243
- - {+int-data-type+}
244
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'maxStalenessSeconds' => 30 ];``
232
+ - | **Data Type**: {+int-data-type+}
233
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'maxStalenessSeconds' => 30 ];``
245
234
| **Connection URI Example**: ``maxStalenessSeconds=30``
246
235
247
236
* - :manual:`readPreferenceTags </reference/connection-string/#mongodb-urioption-urioption.readpreferencetags>`
248
- - ``array``
249
- - **MongoDB\\Client Example**:
250
-
251
- .. code-block::
252
- :copyable: false
253
-
254
- $uriOptions = [
255
- 'readPreferenceTags' => [
256
- [ 'region' => 'east' ],
257
- [ 'region' => 'west']
258
- ]
259
- ];
260
-
261
- **Connection URI Example**: ``readPreferenceTags=region:east,region:west``
237
+ - | **Data Type**: ``array``
238
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'readPreferenceTags' => [ [ 'region' => 'east' ], [ 'region' => 'west'] ] ];``
239
+ | **Connection URI Example**: ``readPreferenceTags=region:east,region:west``
262
240
263
241
Authentication Options
264
242
~~~~~~~~~~~~~~~~~~~~~~
265
243
266
244
.. list-table::
267
245
:header-rows: 1
268
246
:stub-columns: 1
269
- :widths: 30 10 60
270
247
271
248
* - Connection Option
272
- - Data Type
273
- - Syntax
249
+ - Description
274
250
275
251
* - :manual:`authMechanism </reference/connection-string/#mongodb-urioption-urioption.authmechanism>`
276
- - {+string-data-type+}
277
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'authMechanism' => 'MONGODB-X509' ];``
252
+ - | **Data Type**: {+string-data-type+}
253
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'authMechanism' => 'MONGODB-X509' ];``
278
254
| **Connection URI Example**: ``authMechanism=MONGODB-X509``
279
255
280
256
* - :manual:`authMechanismProperties </reference/connection-string/#mongodb-urioption-urioption.authmechanismproperties>`
281
- - {+string-data-type+}
282
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'authMechanism' => 'MONGODB-AWS', 'authMechanismProperties' => 'AWS_SESSION_TOKEN:12345' ];``
257
+ - | **Data Type**: {+string-data-type+}
258
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'authMechanism' => 'MONGODB-AWS', 'authMechanismProperties' => 'AWS_SESSION_TOKEN:12345' ];``
283
259
| **Connection URI Example**: ``authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:12345``
284
260
285
261
* - :manual:`authSource </reference/connection-string/#mongodb-urioption-urioption.authsource>`
286
- - {+string-data-type+}
287
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'authSource' => 'admin' ];``
262
+ - | **Data Type**: {+string-data-type+}
263
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'authSource' => 'admin' ];``
288
264
| **Connection URI Example**: ``authSource=admin``
289
265
290
266
Server Selection and Discovery Options
@@ -293,35 +269,33 @@ Server Selection and Discovery Options
293
269
.. list-table::
294
270
:header-rows: 1
295
271
:stub-columns: 1
296
- :widths: 35 10 55
297
272
298
273
* - Connection Option
299
- - Data Type
300
- - Syntax
274
+ - Description
301
275
302
276
* - :manual:`localThresholdMS </reference/connection-string/#mongodb-urioption-urioption.localthresholdms>`
303
- - {+int-data-type+}
304
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'localThresholdMS' => 20 ];``
277
+ - | **Data Type**: {+int-data-type+}
278
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'localThresholdMS' => 20 ];``
305
279
| **Connection URI Example**: ``localThresholdMS=20``
306
280
307
281
* - :manual:`serverSelectionTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.serverselectiontimeoutms>`
308
- - {+int-data-type+}
309
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'serverSelectionTimeoutMS' => 40000 ];``
282
+ - | **Data Type**: {+int-data-type+}
283
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'serverSelectionTimeoutMS' => 40000 ];``
310
284
| **Connection URI Example**: ``serverSelectionTimeoutMS=40000``
311
285
312
286
* - :manual:`serverSelectionTryOnce </reference/connection-string/#mongodb-urioption-urioption.serverselectiontryonce>`
313
- - {+bool-data-type+}
314
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'serverSelectionTryOnce' => false ];``
287
+ - | **Data Type**: {+bool-data-type+}
288
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'serverSelectionTryOnce' => false ];``
315
289
| **Connection URI Example**: ``serverSelectionTryOnce=false``
316
290
317
291
* - :manual:`heartbeatFrequencyMS </reference/connection-string/#mongodb-urioption-urioption.heartbeatfrequencyms>`
318
- - {+int-data-type+}
319
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'heartbeatFrequencyMS' => 50000 ];``
292
+ - | **Data Type**: {+int-data-type+}
293
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'heartbeatFrequencyMS' => 50000 ];``
320
294
| **Connection URI Example**: ``heartbeatFrequencyMS=50000``
321
295
322
296
* - :manual:`socketCheckIntervalMS </reference/connection-string/#mongodb-urioption-urioption.socketcheckintervalms>`
323
- - {+int-data-type+}
324
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'socketCheckIntervalMS' => 4000 ];``
297
+ - | **Data Type**: {+int-data-type+}
298
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'socketCheckIntervalMS' => 4000 ];``
325
299
| **Connection URI Example**: ``socketCheckIntervalMS=4000``
326
300
327
301
Miscellaneous Configuration
@@ -332,32 +306,31 @@ Miscellaneous Configuration
332
306
:stub-columns: 1
333
307
334
308
* - Connection Option
335
- - Data Type
336
- - Syntax
309
+ - Description
337
310
338
311
* - :manual:`appName </reference/connection-string/#mongodb-urioption-urioption.appname>`
339
- - {+string-data-type+}
340
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'appName' => 'myApp' ];``
312
+ - | **Data Type**: {+string-data-type+}
313
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'appName' => 'myApp' ];``
341
314
| **Connection URI Example**: ``appName=myApp``
342
315
343
316
* - :manual:`retryReads </reference/connection-string/#mongodb-urioption-urioption.retryreads>`
344
- - {+bool-data-type+}
345
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'retryReads' => false ];``
317
+ - | **Data Type**: {+bool-data-type+}
318
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'retryReads' => false ];``
346
319
| **Connection URI Example**: ``retryReads=false``
347
320
348
321
* - :manual:`retryWrites </reference/connection-string/#mongodb-urioption-urioption.retrywrites>`
349
- - {+bool-data-type+}
350
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'retryWrites' => false ];``
322
+ - | **Data Type**: {+bool-data-type+}
323
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'retryWrites' => false ];``
351
324
| **Connection URI Example**: ``retryWrites=false``
352
325
353
326
* - :manual:`loadBalanced </reference/connection-string/#mongodb-urioption-urioption.loadbalanced>`
354
- - {+bool-data-type+}
355
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'loadBalanced' => true ];``
327
+ - | **Data Type**: {+bool-data-type+}
328
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'loadBalanced' => true ];``
356
329
| **Connection URI Example**: ``loadBalanced=false``
357
330
358
331
* - :manual:`srvMaxHosts </reference/connection-string/#mongodb-urioption-urioption.srvmaxhosts>`
359
- - {+int-data-type+}
360
- - | **MongoDB\\Client Example**: ``$uriOptions = [ 'srvMaxHosts' => 5 ];``
332
+ - | **Data Type**: {+int-data-type+}
333
+ | **MongoDB\\Client Example**: ``$uriOptions = [ 'srvMaxHosts' => 5 ];``
361
334
| **Connection URI Example**: ``srvMaxHosts=5``
362
335
363
336
API Documentation
0 commit comments