forked from mongodb/docs-php-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMongoDBClient-getReadConcern.txt
59 lines (39 loc) · 1.19 KB
/
MongoDBClient-getReadConcern.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
=================================
MongoDB\\Client::getReadConcern()
=================================
.. versionadded:: 1.2
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
Definition
----------
.. phpmethod:: MongoDB\Client::getReadConcern()
Returns the read concern for this client.
.. code-block:: php
function getReadConcern(): MongoDB\Driver\ReadConcern
Return Values
-------------
A :php:`MongoDB\Driver\ReadConcern <class.mongodb-driver-readconcern>` object.
Example
-------
.. code-block:: php
<?php
$client = new MongoDB\Client('mongodb://127.0.0.1/', [
'readConcernLevel' => 'majority',
]);
var_dump($client->getReadConcern());
The output would then resemble:
.. code-block:: none
object(MongoDB\Driver\ReadConcern)#5 (1) {
["level"]=>
string(8) "majority"
}
See Also
--------
- :manual:`Read Concern </reference/read-concern>` in the MongoDB manual
- :php:`MongoDB\Driver\ReadConcern::isDefault() <mongodb-driver-readconcern.isdefault>`
- :phpmethod:`MongoDB\Collection::getReadConcern()`
- :phpmethod:`MongoDB\Database::getReadConcern()`
- :phpmethod:`MongoDB\GridFS\Bucket::getReadConcern()`