MongoDB\Driver\WriteConcern::getW

(mongodb >=1.0.0)

MongoDB\Driver\WriteConcern::getWReturns the WriteConcern's "w" option

설명

final public string|int|null MongoDB\Driver\WriteConcern::getW ( void )

인수

이 함수는 인수가 없습니다.

반환값

Returns the WriteConcern's "w" option.

오류/예외

예제

Example #1 MongoDB\Driver\WriteConcern::getW() example

<?php

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

$wc = new MongoDB\Driver\WriteConcern(MongoDB\Driver\WriteConcern::MAJORITY);
var_dump($wc->getW());

?>

위 예제의 출력:

int(1)
string(8) "majority"
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top