@@ -6,25 +6,26 @@ MongoDB\Driver\WriteConcern construction
66<?php
77require_once __DIR__ . "/../utils/basic.inc " ;
88
9- $ w = new MongoDB \Driver \WriteConcern (MongoDB \Driver \WriteConcern::MAJORITY );
10- $ w2 = new MongoDB \Driver \WriteConcern (MongoDB \Driver \WriteConcern::MAJORITY , 1000 );
9+ var_dump ( new MongoDB \Driver \WriteConcern (MongoDB \Driver \WriteConcern::MAJORITY ) );
10+ var_dump ( new MongoDB \Driver \WriteConcern (MongoDB \Driver \WriteConcern::MAJORITY , 1000 ) );
1111
12- $ w3 = new MongoDB \Driver \WriteConcern (2 );
13- $ w4 = new MongoDB \Driver \WriteConcern (2 , 2000 );
12+ var_dump ( new MongoDB \Driver \WriteConcern (2 ) );
13+ var_dump ( new MongoDB \Driver \WriteConcern (2 , 2000 ) );
1414
15- $ w5 = new MongoDB \Driver \WriteConcern ("tagname " );
16- $ w6 = new MongoDB \Driver \WriteConcern ("string " , 3000 );
15+ var_dump ( new MongoDB \Driver \WriteConcern ("tagname " ) );
16+ var_dump ( new MongoDB \Driver \WriteConcern ("string " , 3000 ) );
1717
18- $ w7 = new MongoDB \Driver \WriteConcern ("string " , 3000 , false , false );
19- $ w8 = new MongoDB \Driver \WriteConcern ("string " , 3000 , true , true );
18+ var_dump ( new MongoDB \Driver \WriteConcern ("string " , 4000 , true ) );
19+ var_dump ( new MongoDB \Driver \WriteConcern ("string " , 5000 , false ) );
2020
21- $ w9 = new MongoDB \Driver \WriteConcern ("string " , 3000 , true , false );
22- $ w10 = new MongoDB \Driver \WriteConcern ("string " , 3000 , false , true );
21+ var_dump ( new MongoDB \Driver \WriteConcern ("string " , 6000 , false , false ) );
22+ var_dump ( new MongoDB \Driver \WriteConcern ("string " , 7000 , true , true ) );
2323
24- var_dump ($ w , $ w2 , $ w3 , $ w4 , $ w5 , $ w6 , $ w7 , $ w8 , $ w9 , $ w10 );
24+ var_dump (new MongoDB \Driver \WriteConcern ("string " , 8000 , true , false ));
25+ var_dump (new MongoDB \Driver \WriteConcern ("string " , 9000 , false , true ));
2526
2627try {
27- new MongoDB \Driver \WriteConcern ("string " , 3000 , false , true , 1 );
28+ new MongoDB \Driver \WriteConcern ("string " , 10000 , false , true , 1 );
2829} catch (InvalidArgumentException $ e ) {
2930 echo $ e ->getMessage (), "\n" ;
3031}
@@ -41,9 +42,9 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
4142 ["wtimeout"]=>
4243 int(0)
4344 ["fsync"]=>
44- bool(false)
45+ NULL
4546 ["journal"]=>
46- bool(false)
47+ NULL
4748}
4849object(MongoDB\Driver\WriteConcern)#%d (%d) {
4950 ["w"]=>
@@ -53,9 +54,9 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
5354 ["wtimeout"]=>
5455 int(1000)
5556 ["fsync"]=>
56- bool(false)
57+ NULL
5758 ["journal"]=>
58- bool(false)
59+ NULL
5960}
6061object(MongoDB\Driver\WriteConcern)#%d (%d) {
6162 ["w"]=>
@@ -65,9 +66,9 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
6566 ["wtimeout"]=>
6667 int(0)
6768 ["fsync"]=>
68- bool(false)
69+ NULL
6970 ["journal"]=>
70- bool(false)
71+ NULL
7172}
7273object(MongoDB\Driver\WriteConcern)#%d (%d) {
7374 ["w"]=>
@@ -77,9 +78,9 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
7778 ["wtimeout"]=>
7879 int(2000)
7980 ["fsync"]=>
80- bool(false)
81+ NULL
8182 ["journal"]=>
82- bool(false)
83+ NULL
8384}
8485object(MongoDB\Driver\WriteConcern)#%d (%d) {
8586 ["w"]=>
@@ -89,9 +90,9 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
8990 ["wtimeout"]=>
9091 int(0)
9192 ["fsync"]=>
92- bool(false)
93+ NULL
9394 ["journal"]=>
94- bool(false)
95+ NULL
9596}
9697object(MongoDB\Driver\WriteConcern)#%d (%d) {
9798 ["w"]=>
@@ -101,7 +102,31 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
101102 ["wtimeout"]=>
102103 int(3000)
103104 ["fsync"]=>
105+ NULL
106+ ["journal"]=>
107+ NULL
108+ }
109+ object(MongoDB\Driver\WriteConcern)#%d (%d) {
110+ ["w"]=>
111+ string(6) "string"
112+ ["wmajority"]=>
113+ bool(false)
114+ ["wtimeout"]=>
115+ int(4000)
116+ ["fsync"]=>
117+ NULL
118+ ["journal"]=>
119+ bool(true)
120+ }
121+ object(MongoDB\Driver\WriteConcern)#%d (%d) {
122+ ["w"]=>
123+ string(6) "string"
124+ ["wmajority"]=>
104125 bool(false)
126+ ["wtimeout"]=>
127+ int(5000)
128+ ["fsync"]=>
129+ NULL
105130 ["journal"]=>
106131 bool(false)
107132}
@@ -111,7 +136,7 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
111136 ["wmajority"]=>
112137 bool(false)
113138 ["wtimeout"]=>
114- int(3000 )
139+ int(6000 )
115140 ["fsync"]=>
116141 bool(false)
117142 ["journal"]=>
@@ -123,7 +148,7 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
123148 ["wmajority"]=>
124149 bool(false)
125150 ["wtimeout"]=>
126- int(3000 )
151+ int(7000 )
127152 ["fsync"]=>
128153 bool(true)
129154 ["journal"]=>
@@ -135,7 +160,7 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
135160 ["wmajority"]=>
136161 bool(false)
137162 ["wtimeout"]=>
138- int(3000 )
163+ int(8000 )
139164 ["fsync"]=>
140165 bool(false)
141166 ["journal"]=>
@@ -147,7 +172,7 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
147172 ["wmajority"]=>
148173 bool(false)
149174 ["wtimeout"]=>
150- int(3000 )
175+ int(9000 )
151176 ["fsync"]=>
152177 bool(true)
153178 ["journal"]=>
0 commit comments