/* {{{ OnUpdateCompressionType */ static PHP_INI_MH(OnUpdateCompressionType) { if (!new_value) { COUCHBASE_G(compression_type) = COMPRESSION_TYPE_FASTLZ; } else if (!strcmp(new_value, "fastlz")) { COUCHBASE_G(compression_type) = COMPRESSION_TYPE_FASTLZ; } else if (!strcmp(new_value, "zlib")) { COUCHBASE_G(compression_type) = COMPRESSION_TYPE_ZLIB; } else { return FAILURE; } return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); }
/* {{{ OnUpdateSerializer */ static PHP_INI_MH(OnUpdateSerializer) { if (!new_value) { COUCHBASE_G(serializer) = COUCHBASE_SERIALIZER_DEFAULT; } else if (!strcmp(new_value, "php")) { COUCHBASE_G(serializer) = COUCHBASE_SERIALIZER_PHP; #ifdef HAVE_JSON_API } else if (!strcmp(new_value, "json")) { COUCHBASE_G(serializer) = COUCHBASE_SERIALIZER_JSON; } else if (!strcmp(new_value, "json_array")) { COUCHBASE_G(serializer) = COUCHBASE_SERIALIZER_JSON_ARRAY; #endif } else { return FAILURE; } return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); }
PHP_COUCHBASE_LOCAL void php_couchbase_flush_impl(INTERNAL_FUNCTION_PARAMETERS, int oo) { php_couchbase_res *res; lcb_t instance; int argflags = oo ? PHP_COUCHBASE_ARG_F_OO : PHP_COUCHBASE_ARG_F_FUNCTIONAL; PHP_COUCHBASE_GET_PARAMS(res, argflags, ""); instance = res->handle; lcb_behavior_set_syncmode(instance, LCB_SYNCHRONOUS); if (COUCHBASE_G(restflush)) { do_rest_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, oo, res); } else { do_memcached_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, oo, res); } lcb_behavior_set_syncmode(instance, LCB_ASYNCHRONOUS); }