phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"readConcern\" option to be %s, %s given",ZSTR_VAL(php_phongo_readconcern_ce->name),zend_zval_type_name(option));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"readPreference\" option to be %s, %s given",ZSTR_VAL(php_phongo_readpreference_ce->name),zend_zval_type_name(option));
returnfalse;
}
if(zreadPreference){
*zreadPreference=option;
}
returntrue;
}
/* Parses the "session" option for an execute method. The client object should
* correspond to the Manager executing the operation and will be used to ensure
* that the session is correctly associated with that client. If mongoc_opts is
* not NULL, the option will be appended. If zsession is not NULL, it will be
* assigned to the option. On error, false is returned and an exception is
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"session\" option to be %s, %s given",ZSTR_VAL(php_phongo_session_ce->name),zend_zval_type_name(option));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"writeConcern\" option to be %s, %s given",ZSTR_VAL(php_phongo_writeconcern_ce->name),zend_zval_type_name(option));