Skip to content

Commit d68b868

Browse files
committed
test
1 parent 3a4ead0 commit d68b868

File tree

1 file changed

+59
-60
lines changed

1 file changed

+59
-60
lines changed

source/connect/connection-options.txt

Lines changed: 59 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ passing them to the ``MongoDB\Client`` constructor.
3131

3232
.. TODO:
3333
-code samples
34-
- fix table widths
34+
- move information to right colummn of tables
3535

3636
.. _php-connection-uri:
3737

@@ -90,18 +90,17 @@ Replica Set Options
9090
:stub-columns: 1
9191

9292
* - Connection Option
93-
- Data Type
94-
- Syntax
93+
- Description
9594

9695
* - :manual:`directConnection </reference/connection-string/#mongodb-urioption-urioption.directConnection>`
97-
- {+bool-data-type+}
98-
- | **MongoDB\\Client**: ``$uriOptions = [ 'directConnection' => true ];``
99-
| **Connection URI**: ``directConnection=true``
96+
- | **Data Type**: {+bool-data-type+}
97+
| **MongoDB\\Client Example**: ``$uriOptions = [ 'directConnection' => true ];``
98+
| **Connection URI Example**: ``directConnection=true``
10099

101100
* - :manual:`replicaSet </reference/connection-string/#mongodb-urioption-urioption.replicaSet>`
102101
- {+string-data-type+}
103-
- | **MongoDB\\Client**: ``$uriOptions = [ 'replicaSet' => 'replicaSetName' ];``
104-
| **Connection URI**: ``replicaSet=replicaSetName``
102+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'replicaSet' => 'replicaSetName' ];``
103+
| **Connection URI Example**: ``replicaSet=replicaSetName``
105104

106105
Connection Options
107106
~~~~~~~~~~~~~~~~~~
@@ -124,13 +123,13 @@ Timeout Options
124123

125124
* - :manual:`connectTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.connecttimeoutms>`
126125
- {+int-data-type+}
127-
- | **MongoDB\\Client**: ``$uriOptions = [ 'connectTimeoutMS' => 20000 ];``
128-
| **Connection URI**: ``connectTimeoutMS=20000``
126+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'connectTimeoutMS' => 20000 ];``
127+
| **Connection URI Example**: ``connectTimeoutMS=20000``
129128

130129
* - :manual:`socketTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.sockettimeoutms>`
131130
- {+int-data-type+}
132-
- | **MongoDB\\Client**: ``$uriOptions = [ 'socketTimeoutMS' => 400000 ];``
133-
| **Connection URI**: ``socketTimeoutMS=400000``
131+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'socketTimeoutMS' => 400000 ];``
132+
| **Connection URI Example**: ``socketTimeoutMS=400000``
134133

135134
.. _php-compression-options:
136135

@@ -147,13 +146,13 @@ Compression Options
147146

148147
* - :manual:`compressors </reference/connection-string/#mongodb-urioption-urioption.compressors>`
149148
- {+string-data-type+}
150-
- | **MongoDB\\Client**: ``$uriOptions = [ 'compressors' => 'snappy,zstd,zlib' ];``
151-
| **Connection URI**: ``compressors=snappy,zstd,zlib``
149+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'compressors' => 'snappy,zstd,zlib' ];``
150+
| **Connection URI Example**: ``compressors=snappy,zstd,zlib``
152151

153152
* - :manual:`zlibCompressionLevel </reference/connection-string/#mongodb-urioption-urioption.zlibcompressionlevel>`
154153
- {+int-data-type+}
155-
- | **MongoDB\\Client**: ``$uriOptions = [ 'zlibCompressionLevel' => 3 ];``
156-
| **Connection URI**: ``zlibCompressionLevel=3``
154+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'zlibCompressionLevel' => 3 ];``
155+
| **Connection URI Example**: ``zlibCompressionLevel=3``
157156

158157
Connection Pool Options
159158
~~~~~~~~~~~~~~~~~~~~~~~
@@ -168,13 +167,13 @@ Connection Pool Options
168167

169168
* - :manual:`maxPoolSize </reference/connection-string/#mongodb-urioption-urioption.maxpoolsize>`
170169
- {+int-data-type+}
171-
- | **MongoDB\\Client**: N/A
172-
| **Connection URI**: ``maxPoolSize=75``
170+
- | **MongoDB\\Client Example**: N/A
171+
| **Connection URI Example**: ``maxPoolSize=75``
173172

174173
* - :manual:`waitQueueTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.waitqueuetimeoutms>`
175174
- {+int-data-type+}
176-
- | **MongoDB\\Client**: N/A
177-
| **Connection URI**: ``waitQueueTimeoutMS=10000``
175+
- | **MongoDB\\Client Example**: N/A
176+
| **Connection URI Example**: ``waitQueueTimeoutMS=10000``
178177

179178
Write Concern Options
180179
~~~~~~~~~~~~~~~~~~~~~
@@ -189,18 +188,18 @@ Write Concern Options
189188

190189
* - :manual:`w </reference/connection-string/#mongodb-urioption-urioption.w>`
191190
- {+string-data-type+}
192-
- | **MongoDB\\Client**: ``$uriOptions = [ 'w' => 'majority' ];``
193-
| **Connection URI**: ``w=majority``
191+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'w' => 'majority' ];``
192+
| **Connection URI Example**: ``w=majority``
194193

195194
* - :manual:`wTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.wtimeoutms>`
196195
- {+int-data-type+}
197-
- | **MongoDB\\Client**: ``$uriOptions = [ 'wTimeoutMS' => 10000 ];``
198-
| **Connection URI**: ``wTimeoutMS=10000``
196+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'wTimeoutMS' => 10000 ];``
197+
| **Connection URI Example**: ``wTimeoutMS=10000``
199198

200199
* - :manual:`journal </reference/connection-string/#mongodb-urioption-urioption.journal>`
201200
- {+bool-data-type+}
202-
- | **MongoDB\\Client**: ``$uriOptions = [ 'journal' => true ];``
203-
| **Connection URI**: ``journal=true``
201+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'journal' => true ];``
202+
| **Connection URI Example**: ``journal=true``
204203

205204
Read Concern Options
206205
~~~~~~~~~~~~~~~~~~~~
@@ -215,8 +214,8 @@ Read Concern Options
215214

216215
* - :manual:`readConcernLevel </reference/connection-string/#mongodb-urioption-urioption.readconcernlevel>`
217216
- {+string-data-type+}
218-
- | **MongoDB\\Client**: ``$uriOptions = [ 'readConcernLevel' => 'majority' ];``
219-
| **Connection URI**: ``readConcernLevel=majority``
217+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'readConcernLevel' => 'majority' ];``
218+
| **Connection URI Example**: ``readConcernLevel=majority``
220219

221220
Read Preference Options
222221
~~~~~~~~~~~~~~~~~~~~~~~
@@ -232,22 +231,22 @@ Read Preference Options
232231

233232
* - :manual:`readPreference </reference/connection-string/#mongodb-urioption-urioption.readpreference>`
234233
- ``int`` or ``string``
235-
- **MongoDB\\Client**: ``$uriOptions = [ 'readPreference' => 'secondaryPreferred' ];``
234+
- **MongoDB\\Client Example**: ``$uriOptions = [ 'readPreference' => 'secondaryPreferred' ];``
236235

237-
**Connection URI**: ``readPreference=secondaryPreferred``
236+
**Connection URI Example**: ``readPreference=secondaryPreferred``
238237

239238
For a complete list of the available values for this option, see the
240239
`MongoDB\\Driver\\ReadPreference <https://www.php.net/manual/en/class.mongodb-driver-readpreference.php>`__
241240
API documentation.
242241

243242
* - :manual:`maxStalenessSeconds </reference/connection-string/#mongodb-urioption-urioption.maxstalenessseconds>`
244243
- {+int-data-type+}
245-
- | **MongoDB\\Client**: ``$uriOptions = [ 'maxStalenessSeconds' => 30 ];``
246-
| **Connection URI**: ``maxStalenessSeconds=30``
244+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'maxStalenessSeconds' => 30 ];``
245+
| **Connection URI Example**: ``maxStalenessSeconds=30``
247246

248247
* - :manual:`readPreferenceTags </reference/connection-string/#mongodb-urioption-urioption.readpreferencetags>`
249248
- ``array``
250-
- **MongoDB\\Client**:
249+
- **MongoDB\\Client Example**:
251250

252251
.. code-block::
253252
:copyable: false
@@ -259,7 +258,7 @@ Read Preference Options
259258
]
260259
];
261260

262-
**Connection URI**: ``readPreferenceTags=region:east,region:west``
261+
**Connection URI Example**: ``readPreferenceTags=region:east,region:west``
263262

264263
Authentication Options
265264
~~~~~~~~~~~~~~~~~~~~~~
@@ -275,18 +274,18 @@ Authentication Options
275274

276275
* - :manual:`authMechanism </reference/connection-string/#mongodb-urioption-urioption.authmechanism>`
277276
- {+string-data-type+}
278-
- | **MongoDB\\Client**: ``$uriOptions = [ 'authMechanism' => 'MONGODB-X509' ];``
279-
| **Connection URI**: ``authMechanism=MONGODB-X509``
277+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'authMechanism' => 'MONGODB-X509' ];``
278+
| **Connection URI Example**: ``authMechanism=MONGODB-X509``
280279

281280
* - :manual:`authMechanismProperties </reference/connection-string/#mongodb-urioption-urioption.authmechanismproperties>`
282281
- {+string-data-type+}
283-
- | **MongoDB\\Client**: ``$uriOptions = [ 'authMechanism' => 'MONGODB-AWS', 'authMechanismProperties' => 'AWS_SESSION_TOKEN:12345' ];``
284-
| **Connection URI**: ``authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:12345``
282+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'authMechanism' => 'MONGODB-AWS', 'authMechanismProperties' => 'AWS_SESSION_TOKEN:12345' ];``
283+
| **Connection URI Example**: ``authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:12345``
285284

286285
* - :manual:`authSource </reference/connection-string/#mongodb-urioption-urioption.authsource>`
287286
- {+string-data-type+}
288-
- | **MongoDB\\Client**: ``$uriOptions = [ 'authSource' => 'admin' ];``
289-
| **Connection URI**: ``authSource=admin``
287+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'authSource' => 'admin' ];``
288+
| **Connection URI Example**: ``authSource=admin``
290289

291290
Server Selection and Discovery Options
292291
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -302,28 +301,28 @@ Server Selection and Discovery Options
302301

303302
* - :manual:`localThresholdMS </reference/connection-string/#mongodb-urioption-urioption.localthresholdms>`
304303
- {+int-data-type+}
305-
- | **MongoDB\\Client**: ``$uriOptions = [ 'localThresholdMS' => 20 ];``
306-
| **Connection URI**: ``localThresholdMS=20``
304+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'localThresholdMS' => 20 ];``
305+
| **Connection URI Example**: ``localThresholdMS=20``
307306

308307
* - :manual:`serverSelectionTimeoutMS </reference/connection-string/#mongodb-urioption-urioption.serverselectiontimeoutms>`
309308
- {+int-data-type+}
310-
- | **MongoDB\\Client**: ``$uriOptions = [ 'serverSelectionTimeoutMS' => 40000 ];``
311-
| **Connection URI**: ``serverSelectionTimeoutMS=40000``
309+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'serverSelectionTimeoutMS' => 40000 ];``
310+
| **Connection URI Example**: ``serverSelectionTimeoutMS=40000``
312311

313312
* - :manual:`serverSelectionTryOnce </reference/connection-string/#mongodb-urioption-urioption.serverselectiontryonce>`
314313
- {+bool-data-type+}
315-
- | **MongoDB\\Client**: ``$uriOptions = [ 'serverSelectionTryOnce' => false ];``
316-
| **Connection URI**: ``serverSelectionTryOnce=false``
314+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'serverSelectionTryOnce' => false ];``
315+
| **Connection URI Example**: ``serverSelectionTryOnce=false``
317316

318317
* - :manual:`heartbeatFrequencyMS </reference/connection-string/#mongodb-urioption-urioption.heartbeatfrequencyms>`
319318
- {+int-data-type+}
320-
- | **MongoDB\\Client**: ``$uriOptions = [ 'heartbeatFrequencyMS' => 50000 ];``
321-
| **Connection URI**: ``heartbeatFrequencyMS=50000``
319+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'heartbeatFrequencyMS' => 50000 ];``
320+
| **Connection URI Example**: ``heartbeatFrequencyMS=50000``
322321

323322
* - :manual:`socketCheckIntervalMS </reference/connection-string/#mongodb-urioption-urioption.socketcheckintervalms>`
324323
- {+int-data-type+}
325-
- | **MongoDB\\Client**: ``$uriOptions = [ 'socketCheckIntervalMS' => 4000 ];``
326-
| **Connection URI**: ``socketCheckIntervalMS=4000``
324+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'socketCheckIntervalMS' => 4000 ];``
325+
| **Connection URI Example**: ``socketCheckIntervalMS=4000``
327326

328327
Miscellaneous Configuration
329328
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -338,28 +337,28 @@ Miscellaneous Configuration
338337

339338
* - :manual:`appName </reference/connection-string/#mongodb-urioption-urioption.appname>`
340339
- {+string-data-type+}
341-
- | **MongoDB\\Client**: ``$uriOptions = [ 'appName' => 'myApp' ];``
342-
| **Connection URI**: ``appName=myApp``
340+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'appName' => 'myApp' ];``
341+
| **Connection URI Example**: ``appName=myApp``
343342

344343
* - :manual:`retryReads </reference/connection-string/#mongodb-urioption-urioption.retryreads>`
345344
- {+bool-data-type+}
346-
- | **MongoDB\\Client**: ``$uriOptions = [ 'retryReads' => false ];``
347-
| **Connection URI**: ``retryReads=false``
345+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'retryReads' => false ];``
346+
| **Connection URI Example**: ``retryReads=false``
348347

349348
* - :manual:`retryWrites </reference/connection-string/#mongodb-urioption-urioption.retrywrites>`
350349
- {+bool-data-type+}
351-
- | **MongoDB\\Client**: ``$uriOptions = [ 'retryWrites' => false ];``
352-
| **Connection URI**: ``retryWrites=false``
350+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'retryWrites' => false ];``
351+
| **Connection URI Example**: ``retryWrites=false``
353352

354353
* - :manual:`loadBalanced </reference/connection-string/#mongodb-urioption-urioption.loadbalanced>`
355354
- {+bool-data-type+}
356-
- | **MongoDB\\Client**: ``$uriOptions = [ 'loadBalanced' => true ];``
357-
| **Connection URI**: ``loadBalanced=false``
355+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'loadBalanced' => true ];``
356+
| **Connection URI Example**: ``loadBalanced=false``
358357

359358
* - :manual:`srvMaxHosts </reference/connection-string/#mongodb-urioption-urioption.srvmaxhosts>`
360359
- {+int-data-type+}
361-
- | **MongoDB\\Client**: ``$uriOptions = [ 'srvMaxHosts' => 5 ];``
362-
| **Connection URI**: ``srvMaxHosts=5``
360+
- | **MongoDB\\Client Example**: ``$uriOptions = [ 'srvMaxHosts' => 5 ];``
361+
| **Connection URI Example**: ``srvMaxHosts=5``
363362

364363
API Documentation
365364
-----------------

0 commit comments

Comments
 (0)