Menu Docs
Página inicial do Docs
/ / /
Manual da Biblioteca PHP
/ /

MongoDB\GridFS\Bucket::getWriteConcern()

Nesta página

  • Definição
  • Return Values
  • Exemplo
  • Veja também

Novidade da versão 1.2.

MongoDB\GridFS\Bucket::getWriteConcern()

Retorna a referência de escrita para este bucket GridFS.

function getWriteConcern(): MongoDB\Driver\WriteConcern

A MongoDB\Driver\WriteConcern evento.

<?php
$database = (new MongoDB\Client)->selectDatabase('test');
$bucket = $database->selectGridFSBucket([
'writeConcern' => new MongoDB\Driver\WriteConcern(1, 0, true),
]);
var_dump($bucket->getWriteConcern());

A saída seria então semelhante a:

object(MongoDB\Driver\WriteConcern)#3 (2) {
["w"]=>
int(1)
["j"]=>
bool(true)
}
  • Write Concern no Manual do MongoDB

  • MongoDB\Driver\WriteConcern::isDefault()

  • MongoDB\Client::getWriteConcern()

  • MongoDB\Collection::getWriteConcern()

  • MongoDB\Database::getWriteConcern()

Voltar

getTypeMap()