phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC,"Expected \"readConcern\" option to be %s, %s given",ZSTR_VAL(php_phongo_readconcern_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(option));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC,"Expected \"readPreference\" option to be %s, %s given",ZSTR_VAL(php_phongo_readpreference_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(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_ARGUMENTTSRMLS_CC,"Expected \"session\" option to be %s, %s given",ZSTR_VAL(php_phongo_session_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(option));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC,"Expected \"writeConcern\" option to be %s, %s given",ZSTR_VAL(php_phongo_writeconcern_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(option));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC,"BulkWrite objects may only be executed once and this instance has already been executed");
/* Should never happen, but if it does: exception */
phongo_throw_exception(PHONGO_ERROR_LOGICTSRMLS_CC,"Type '%d' should never have been passed to phongo_execute_command, please file a bug report",type);
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC,"Expected maxStalenessSeconds to be >= %d, %"PRId64" given",MONGOC_SMALLEST_MAX_STALENESS_SECONDS,max_staleness_seconds);
mongoc_read_prefs_destroy(new_rp);
returnfalse;
}
if(max_staleness_seconds>INT32_MAX){
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC,"Expected maxStalenessSeconds to be <= %d, %"PRId64" given",INT32_MAX,max_staleness_seconds);