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

MongoDB\Collection::getWriteConcern()

Nesta página

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

Novidade da versão 1.2.

MongoDB\Collection::getWriteConcern()

Retorna a referência de escrita para essa collection.

function getWriteConcern(): MongoDB\Driver\WriteConcern

A MongoDB\Driver\WriteConcern evento.

<?php
$collection = (new MongoDB\Client)->selectCollection('test', 'users', [
'writeConcern' => new MongoDB\Driver\WriteConcern(1, 0, true),
]);
var_dump($collection->getWriteConcern());

A saída seria então semelhante a:

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

  • MongoDB\Driver\WriteConcern::isDefault()

  • MongoDB\Client::getWriteConcern()

  • MongoDB\Database::getWriteConcern()

  • MongoDB\GridFS\Bucket::getWriteConcern()

Voltar

getTypeMap()