MongoDB\Driver\ReadConcern::__construct

(mongodb >=1.0.0)

MongoDB\Driver\ReadConcern::__constructCreate a new ReadConcern

Description

finalpublicMongoDB\Driver\ReadConcern::__construct(?string$level = null)

Constructs a new MongoDB\Driver\ReadConcern, which is an immutable value object.

Parameters

level

The » read concern level. You may use, but are not limited to, one of the class constants.

Errors/Exceptions

Examples

Example #1 MongoDB\Driver\ReadConcern::__construct() example

<?php


$rc = new MongoDB\Driver\ReadConcern();


$rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL);


$rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY);

?>
To Top