@@ -47,7 +47,7 @@ PHONGO_API zend_class_entry *php_phongo_writeconcern_ce;
47
47
48
48
zend_object_handlers php_phongo_handler_writeconcern ;
49
49
50
- /* {{{ proto MongoDB\Driver\WriteConcern WriteConcern::__construct(integer|string $w[, integer $wtimeout[, boolean $journal[, boolean $fsync] ]])
50
+ /* {{{ proto MongoDB\Driver\WriteConcern WriteConcern::__construct(integer|string $w[, integer $wtimeout[, boolean $journal]])
51
51
Constructs a new WriteConcern */
52
52
PHP_METHOD (WriteConcern , __construct )
53
53
{
@@ -57,16 +57,14 @@ PHP_METHOD(WriteConcern, __construct)
57
57
long wtimeout = 0 ;
58
58
zend_bool journal = 0 ;
59
59
zend_bool journal_is_null = 0 ;
60
- zend_bool fsync = 0 ;
61
- zend_bool fsync_is_null = 0 ;
62
60
63
61
(void )return_value ; (void )return_value_ptr ; (void )return_value_used ;
64
62
65
63
66
64
zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
67
65
intern = (php_phongo_writeconcern_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
68
66
69
- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "z|lb!b! " , & w , & wtimeout , & journal , & journal_is_null , & fsync , & fsync_is_null ) == FAILURE ) {
67
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "z|lb!" , & w , & wtimeout , & journal , & journal_is_null ) == FAILURE ) {
70
68
zend_restore_error_handling (& error_handling TSRMLS_CC );
71
69
return ;
72
70
}
@@ -93,11 +91,6 @@ PHP_METHOD(WriteConcern, __construct)
93
91
}
94
92
95
93
switch (ZEND_NUM_ARGS ()) {
96
- case 4 :
97
- if (!fsync_is_null ) {
98
- mongoc_write_concern_set_fsync (intern -> write_concern , fsync );
99
- }
100
- /* fallthrough */
101
94
case 3 :
102
95
if (!journal_is_null ) {
103
96
mongoc_write_concern_set_journal (intern -> write_concern , journal );
@@ -184,27 +177,6 @@ PHP_METHOD(WriteConcern, getJournal)
184
177
}
185
178
/* }}} */
186
179
187
- /* {{{ proto null|boolean WriteConcern::getFsync()
188
- Returns the WriteConcern "fsync" option */
189
- PHP_METHOD (WriteConcern , getFsync )
190
- {
191
- php_phongo_writeconcern_t * intern ;
192
- (void )return_value_ptr ; (void )return_value_used ;
193
-
194
- intern = (php_phongo_writeconcern_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
195
-
196
- if (zend_parse_parameters_none () == FAILURE ) {
197
- return ;
198
- }
199
-
200
- if (intern -> write_concern -> fsync_ != MONGOC_WRITE_CONCERN_FSYNC_DEFAULT ) {
201
- RETURN_BOOL (mongoc_write_concern_get_fsync (intern -> write_concern ));
202
- }
203
-
204
- RETURN_NULL ();
205
- }
206
- /* }}} */
207
-
208
180
/**
209
181
* Value object for write concern used in issuing write operations.
210
182
*/
@@ -214,7 +186,6 @@ ZEND_BEGIN_ARG_INFO_EX(ai_WriteConcern___construct, 0, 0, 1)
214
186
ZEND_ARG_INFO (0 , w )
215
187
ZEND_ARG_INFO (0 , wtimeout )
216
188
ZEND_ARG_INFO (0 , journal )
217
- ZEND_ARG_INFO (0 , fsync )
218
189
ZEND_END_ARG_INFO ();
219
190
220
191
ZEND_BEGIN_ARG_INFO_EX (ai_WriteConcern_getW , 0 , 0 , 0 )
@@ -226,15 +197,11 @@ ZEND_END_ARG_INFO();
226
197
ZEND_BEGIN_ARG_INFO_EX (ai_WriteConcern_getJournal , 0 , 0 , 0 )
227
198
ZEND_END_ARG_INFO ();
228
199
229
- ZEND_BEGIN_ARG_INFO_EX (ai_WriteConcern_getFsync , 0 , 0 , 0 )
230
- ZEND_END_ARG_INFO ();
231
-
232
200
static zend_function_entry php_phongo_writeconcern_me [] = {
233
201
PHP_ME (WriteConcern , __construct , ai_WriteConcern___construct , ZEND_ACC_PUBLIC |ZEND_ACC_FINAL )
234
202
PHP_ME (WriteConcern , getW , ai_WriteConcern_getW , ZEND_ACC_PUBLIC |ZEND_ACC_FINAL )
235
203
PHP_ME (WriteConcern , getWtimeout , ai_WriteConcern_getWtimeout , ZEND_ACC_PUBLIC |ZEND_ACC_FINAL )
236
204
PHP_ME (WriteConcern , getJournal , ai_WriteConcern_getJournal , ZEND_ACC_PUBLIC |ZEND_ACC_FINAL )
237
- PHP_ME (WriteConcern , getFsync , ai_WriteConcern_getFsync , ZEND_ACC_PUBLIC |ZEND_ACC_FINAL )
238
205
PHP_FE_END
239
206
};
240
207
0 commit comments