MongoDB\Database::getWriteConcern()
On this page
New in version 1.2.
Definition
Return Values
A MongoDB\Driver\WriteConcern object.
Example
$database = (new MongoDB\Client)->selectDatabase('test', [ 'writeConcern' => new MongoDB\Driver\WriteConcern(1, 0, true), ]); var_dump($database->getWriteConcern());
The output would then resemble:
object(MongoDB\Driver\WriteConcern)#5 (2) { ["w"]=> int(1) ["j"]=> bool(true) }