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