php8.5
Home/ Manual/ driver / writeconcern/ MongoDB\Driver\WriteConcern::getJournal

MongoDB\Driver\WriteConcern::getJournal

PHP function Edit on GitHub ✎

(mongodb >=1.0.0)

Returns the WriteConcern's "journal" option

Description

MongoDB\Driver\WriteConcern::getJournal(): bool|null

Parameters Parameters

Return Values

Returns the WriteConcern's "journal" option.

Errors/Exceptions

Examples

MongoDB\Driver\WriteConcern::getJournal() example

php
<?php

$wc = new MongoDB\Driver\WriteConcern(1);
var_dump($wc->getJournal());

$wc = new MongoDB\Driver\WriteConcern(1, 0, true);
var_dump($wc->getJournal());

$wc = new MongoDB\Driver\WriteConcern(1, 0, false);
var_dump($wc->getJournal());

?>

The above example will output:

output
NULL
bool(true)
bool(false)

See Also

  • Write Concern reference

Source: reference/mongodb/mongodb/driver/writeconcern/getjournal.xml · from the official PHP manual (php/doc-en)