diff options
Diffstat (limited to 'redis.c')
-rw-r--r-- | redis.c | 410 |
1 files changed, 13 insertions, 397 deletions
@@ -60,6 +60,17 @@ extern zend_class_entry *redis_sentinel_ce; zend_class_entry *redis_ce; zend_class_entry *redis_exception_ce; +#if PHP_VERSION_ID < 80000 +#include "redis_legacy_arginfo.h" +#else +#include "redis_arginfo.h" +#endif + +extern const zend_function_entry *redis_get_methods(void) +{ + return class_Redis_methods; +} + extern int le_cluster_slot_cache; int le_redis_pconnect; @@ -102,401 +113,6 @@ PHP_INI_BEGIN() PHP_INI_ENTRY("redis.session.lock_wait_time", "20000", PHP_INI_ALL, NULL) PHP_INI_END() -/** {{{ Argument info for commands in redis 1.0 */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_connect, 0, 0, 1) - ZEND_ARG_INFO(0, host) - ZEND_ARG_INFO(0, port) - ZEND_ARG_INFO(0, timeout) - ZEND_ARG_INFO(0, retry_interval) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_zdiff, 0, 0, 1) - ZEND_ARG_ARRAY_INFO(0, keys, 0) - ZEND_ARG_ARRAY_INFO(0, options, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_zinterunion, 0, 0, 1) - ZEND_ARG_ARRAY_INFO(0, keys, 0) - ZEND_ARG_ARRAY_INFO(0, weights, 1) - ZEND_ARG_ARRAY_INFO(0, options, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_zdiffstore, 0, 0, 2) - ZEND_ARG_INFO(0, destination) - ZEND_ARG_ARRAY_INFO(0, keys, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_info, 0, 0, 0) - ZEND_ARG_INFO(0, option) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_multi, 0, 0, 0) - ZEND_ARG_INFO(0, mode) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_client, 0, 0, 1) - ZEND_ARG_INFO(0, cmd) - ZEND_ARG_VARIADIC_INFO(0, args) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_config, 0, 0, 2) - ZEND_ARG_INFO(0, cmd) - ZEND_ARG_INFO(0, key) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_copy, 0, 0, 2) - ZEND_ARG_INFO(0, source) - ZEND_ARG_INFO(0, destination) - ZEND_ARG_ARRAY_INFO(0, options, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_flush, 0, 0, 0) - ZEND_ARG_INFO(0, async) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_pubsub, 0, 0, 1) - ZEND_ARG_INFO(0, cmd) - ZEND_ARG_VARIADIC_INFO(0, args) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_slowlog, 0, 0, 1) - ZEND_ARG_INFO(0, arg) - ZEND_ARG_INFO(0, option) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_pconnect, 0, 0, 1) - ZEND_ARG_INFO(0, host) - ZEND_ARG_INFO(0, port) - ZEND_ARG_INFO(0, timeout) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_mget, 0, 0, 1) - ZEND_ARG_ARRAY_INFO(0, keys, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_lmove, 0, 0, 4) - ZEND_ARG_INFO(0, source) - ZEND_ARG_INFO(0, destination) - ZEND_ARG_INFO(0, wherefrom) - ZEND_ARG_INFO(0, whereto) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_exists, 0, 0, 1) - ZEND_ARG_INFO(0, key) - ZEND_ARG_VARIADIC_INFO(0, other_keys) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_del, 0, 0, 1) - ZEND_ARG_INFO(0, key) - ZEND_ARG_VARIADIC_INFO(0, other_keys) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_keys, 0, 0, 1) - ZEND_ARG_INFO(0, pattern) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_generic_sort, 0, 0, 1) - ZEND_ARG_INFO(0, key) - ZEND_ARG_INFO(0, pattern) - ZEND_ARG_INFO(0, get) - ZEND_ARG_INFO(0, start) - ZEND_ARG_INFO(0, end) - ZEND_ARG_INFO(0, getList) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_lrem, 0, 0, 3) - ZEND_ARG_INFO(0, key) - ZEND_ARG_INFO(0, value) - ZEND_ARG_INFO(0, count) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_auth, 0, 0, 1) - ZEND_ARG_INFO(0, auth) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_select, 0, 0, 1) - ZEND_ARG_INFO(0, dbindex) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_move, 0, 0, 2) - ZEND_ARG_INFO(0, key) - ZEND_ARG_INFO(0, dbindex) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_slaveof, 0, 0, 0) - ZEND_ARG_INFO(0, host) - ZEND_ARG_INFO(0, port) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_acl, 0, 0, 1) - ZEND_ARG_INFO(0, subcmd) - ZEND_ARG_VARIADIC_INFO(0, args) -ZEND_END_ARG_INFO() - -/* }}} */ - -ZEND_BEGIN_ARG_INFO_EX(arginfo_migrate, 0, 0, 5) - ZEND_ARG_INFO(0, host) - ZEND_ARG_INFO(0, port) - ZEND_ARG_INFO(0, key) - ZEND_ARG_INFO(0, db) - ZEND_ARG_INFO(0, timeout) - ZEND_ARG_INFO(0, copy) - ZEND_ARG_INFO(0, replace) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_wait, 0, 0, 2) - ZEND_ARG_INFO(0, numslaves) - ZEND_ARG_INFO(0, timeout) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_script, 0, 0, 1) - ZEND_ARG_INFO(0, cmd) - ZEND_ARG_VARIADIC_INFO(0, args) -ZEND_END_ARG_INFO() - -/** - * Argument info for the SCAN proper - */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_scan, 0, 0, 1) - ZEND_ARG_INFO(1, i_iterator) - ZEND_ARG_INFO(0, str_pattern) - ZEND_ARG_INFO(0, i_count) -ZEND_END_ARG_INFO() - -/** - * Argument info for key scanning - */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_kscan, 0, 0, 2) - ZEND_ARG_INFO(0, str_key) - ZEND_ARG_INFO(1, i_iterator) - ZEND_ARG_INFO(0, str_pattern) - ZEND_ARG_INFO(0, i_count) -ZEND_END_ARG_INFO() - -static zend_function_entry redis_functions[] = { - PHP_ME(Redis, __construct, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, __destruct, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, _prefix, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, _serialize, arginfo_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, _unserialize, arginfo_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, _pack, arginfo_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, _unpack, arginfo_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, _compress, arginfo_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, _uncompress, arginfo_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, acl, arginfo_acl, ZEND_ACC_PUBLIC) - PHP_ME(Redis, append, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, auth, arginfo_auth, ZEND_ACC_PUBLIC) - PHP_ME(Redis, bgSave, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, bgrewriteaof, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, bitcount, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, bitop, arginfo_bitop, ZEND_ACC_PUBLIC) - PHP_ME(Redis, bitpos, arginfo_bitpos, ZEND_ACC_PUBLIC) - PHP_ME(Redis, blPop, arginfo_blrpop, ZEND_ACC_PUBLIC) - PHP_ME(Redis, brPop, arginfo_blrpop, ZEND_ACC_PUBLIC) - PHP_ME(Redis, brpoplpush, arginfo_brpoplpush, ZEND_ACC_PUBLIC) - PHP_ME(Redis, bzPopMax, arginfo_blrpop, ZEND_ACC_PUBLIC) - PHP_ME(Redis, bzPopMin, arginfo_blrpop, ZEND_ACC_PUBLIC) - PHP_ME(Redis, clearLastError, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, client, arginfo_client, ZEND_ACC_PUBLIC) - PHP_ME(Redis, close, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, command, arginfo_command, ZEND_ACC_PUBLIC) - PHP_ME(Redis, config, arginfo_config, ZEND_ACC_PUBLIC) - PHP_ME(Redis, connect, arginfo_connect, ZEND_ACC_PUBLIC) - PHP_ME(Redis, copy, arginfo_copy, ZEND_ACC_PUBLIC) - PHP_ME(Redis, dbSize, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, debug, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, decr, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, decrBy, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, del, arginfo_del, ZEND_ACC_PUBLIC) - PHP_ME(Redis, discard, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, dump, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, echo, arginfo_echo, ZEND_ACC_PUBLIC) - PHP_ME(Redis, eval, arginfo_eval, ZEND_ACC_PUBLIC) - PHP_ME(Redis, evalsha, arginfo_evalsha, ZEND_ACC_PUBLIC) - PHP_ME(Redis, exec, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, exists, arginfo_exists, ZEND_ACC_PUBLIC) - PHP_ME(Redis, expire, arginfo_expire, ZEND_ACC_PUBLIC) - PHP_ME(Redis, expireAt, arginfo_key_timestamp, ZEND_ACC_PUBLIC) - PHP_ME(Redis, flushAll, arginfo_flush, ZEND_ACC_PUBLIC) - PHP_ME(Redis, flushDB, arginfo_flush, ZEND_ACC_PUBLIC) - PHP_ME(Redis, geoadd, arginfo_geoadd, ZEND_ACC_PUBLIC) - PHP_ME(Redis, geodist, arginfo_geodist, ZEND_ACC_PUBLIC) - PHP_ME(Redis, geohash, arginfo_key_members, ZEND_ACC_PUBLIC) - PHP_ME(Redis, geopos, arginfo_key_members, ZEND_ACC_PUBLIC) - PHP_ME(Redis, georadius, arginfo_georadius, ZEND_ACC_PUBLIC) - PHP_ME(Redis, georadius_ro, arginfo_georadius, ZEND_ACC_PUBLIC) - PHP_ME(Redis, georadiusbymember, arginfo_georadiusbymember, ZEND_ACC_PUBLIC) - PHP_ME(Redis, georadiusbymember_ro, arginfo_georadiusbymember, ZEND_ACC_PUBLIC) - PHP_ME(Redis, get, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getAuth, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getBit, arginfo_key_offset, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getDBNum, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getHost, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getLastError, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getMode, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getOption, arginfo_getoption, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getPersistentID, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getPort, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getRange, arginfo_key_start_end, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getReadTimeout, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getSet, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, getTimeout, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hDel, arginfo_key_members, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hExists, arginfo_key_member, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hGet, arginfo_key_member, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hGetAll, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hIncrBy, arginfo_key_member_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hIncrByFloat, arginfo_key_member_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hKeys, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hLen, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hMget, arginfo_hmget, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hMset, arginfo_hmset, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hSet, arginfo_key_member_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hSetNx, arginfo_key_member_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hStrLen, arginfo_key_member, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hVals, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, hscan, arginfo_kscan, ZEND_ACC_PUBLIC) - PHP_ME(Redis, incr, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, incrBy, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, incrByFloat, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, info, arginfo_info, ZEND_ACC_PUBLIC) - PHP_ME(Redis, isConnected, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, keys, arginfo_keys, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lInsert, arginfo_linsert, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lLen, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lMove, arginfo_lmove, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lPop, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lPush, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lPushx, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lSet, arginfo_lset, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lastSave, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lindex, arginfo_lindex, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lrange, arginfo_key_start_end, ZEND_ACC_PUBLIC) - PHP_ME(Redis, lrem, arginfo_lrem, ZEND_ACC_PUBLIC) - PHP_ME(Redis, ltrim, arginfo_ltrim, ZEND_ACC_PUBLIC) - PHP_ME(Redis, mget, arginfo_mget, ZEND_ACC_PUBLIC) - PHP_ME(Redis, migrate, arginfo_migrate, ZEND_ACC_PUBLIC) - PHP_ME(Redis, move, arginfo_move, ZEND_ACC_PUBLIC) - PHP_ME(Redis, mset, arginfo_pairs, ZEND_ACC_PUBLIC) - PHP_ME(Redis, msetnx, arginfo_pairs, ZEND_ACC_PUBLIC) - PHP_ME(Redis, multi, arginfo_multi, ZEND_ACC_PUBLIC) - PHP_ME(Redis, object, arginfo_object, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pconnect, arginfo_pconnect, ZEND_ACC_PUBLIC) - PHP_ME(Redis, persist, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pexpire, arginfo_key_timestamp, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pexpireAt, arginfo_key_timestamp, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pfadd, arginfo_pfadd, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pfcount, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pfmerge, arginfo_pfmerge, ZEND_ACC_PUBLIC) - PHP_ME(Redis, ping, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pipeline, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, psetex, arginfo_key_expire_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, psubscribe, arginfo_psubscribe, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pttl, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, publish, arginfo_publish, ZEND_ACC_PUBLIC) - PHP_ME(Redis, pubsub, arginfo_pubsub, ZEND_ACC_PUBLIC) - PHP_ME(Redis, punsubscribe, arginfo_punsubscribe, ZEND_ACC_PUBLIC) - PHP_ME(Redis, rPop, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, rPush, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, rPushx, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, randomKey, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, rawcommand, arginfo_rawcommand, ZEND_ACC_PUBLIC) - PHP_ME(Redis, rename, arginfo_key_newkey, ZEND_ACC_PUBLIC) - PHP_ME(Redis, renameNx, arginfo_key_newkey, ZEND_ACC_PUBLIC) - PHP_ME(Redis, restore, arginfo_restore, ZEND_ACC_PUBLIC) - PHP_ME(Redis, role, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, rpoplpush, arginfo_rpoplpush, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sAdd, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sAddArray, arginfo_sadd_array, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sDiff, arginfo_nkeys, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sDiffStore, arginfo_dst_nkeys, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sInter, arginfo_nkeys, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sInterStore, arginfo_dst_nkeys, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sMembers, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sMisMember, arginfo_key_members, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sMove, arginfo_smove, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sPop, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sRandMember, arginfo_srand_member, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sUnion, arginfo_nkeys, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sUnionStore, arginfo_dst_nkeys, ZEND_ACC_PUBLIC) - PHP_ME(Redis, save, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, scan, arginfo_scan, ZEND_ACC_PUBLIC) - PHP_ME(Redis, scard, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, script, arginfo_script, ZEND_ACC_PUBLIC) - PHP_ME(Redis, select, arginfo_select, ZEND_ACC_PUBLIC) - PHP_ME(Redis, set, arginfo_set, ZEND_ACC_PUBLIC) - PHP_ME(Redis, setBit, arginfo_key_offset_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, setOption, arginfo_setoption, ZEND_ACC_PUBLIC) - PHP_ME(Redis, setRange, arginfo_key_offset_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, setex, arginfo_key_expire_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, setnx, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sismember, arginfo_key_value, ZEND_ACC_PUBLIC) - PHP_ME(Redis, slaveof, arginfo_slaveof, ZEND_ACC_PUBLIC) - PHP_ME(Redis, slowlog, arginfo_slowlog, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sort, arginfo_sort, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sortAsc, arginfo_generic_sort, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED) - PHP_ME(Redis, sortAscAlpha, arginfo_generic_sort, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED) - PHP_ME(Redis, sortDesc, arginfo_generic_sort, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED) - PHP_ME(Redis, sortDescAlpha, arginfo_generic_sort, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED) - PHP_ME(Redis, srem, arginfo_key_members, ZEND_ACC_PUBLIC) - PHP_ME(Redis, sscan, arginfo_kscan, ZEND_ACC_PUBLIC) - PHP_ME(Redis, strlen, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, subscribe, arginfo_subscribe, ZEND_ACC_PUBLIC) - PHP_ME(Redis, swapdb, arginfo_swapdb, ZEND_ACC_PUBLIC) - PHP_ME(Redis, time, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, ttl, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, type, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, unlink, arginfo_nkeys, ZEND_ACC_PUBLIC) - PHP_ME(Redis, unsubscribe, arginfo_unsubscribe, ZEND_ACC_PUBLIC) - PHP_ME(Redis, unwatch, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(Redis, wait, arginfo_wait, ZEND_ACC_PUBLIC) - PHP_ME(Redis, watch, arginfo_watch, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xack, arginfo_xack, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xadd, arginfo_xadd, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xclaim, arginfo_xclaim, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xdel, arginfo_xdel, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xgroup, arginfo_xgroup, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xinfo, arginfo_xinfo, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xlen, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xpending, arginfo_xpending, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xrange, arginfo_xrange, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xread, arginfo_xread, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xreadgroup, arginfo_xreadgroup, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xrevrange, arginfo_xrange, ZEND_ACC_PUBLIC) - PHP_ME(Redis, xtrim, arginfo_xtrim, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zAdd, arginfo_zadd, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zCard, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zCount, arginfo_key_min_max, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zIncrBy, arginfo_zincrby, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zLexCount, arginfo_key_min_max, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zMscore, arginfo_key_members, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zPopMax, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zPopMin, arginfo_key, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRange, arginfo_zrange, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRangeByLex, arginfo_zrangebylex, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRangeByScore, arginfo_zrangebyscore, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRank, arginfo_key_member, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRem, arginfo_key_members, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRemRangeByLex, arginfo_key_min_max, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRemRangeByRank, arginfo_key_start_end, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRemRangeByScore, arginfo_key_min_max, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRevRange, arginfo_zrange, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRevRangeByLex, arginfo_zrangebylex, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRevRangeByScore, arginfo_zrangebyscore, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zRevRank, arginfo_key_member, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zScore, arginfo_key_member, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zdiff, arginfo_zdiff, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zdiffstore, arginfo_zdiffstore, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zinter, arginfo_zinterunion, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zinterstore, arginfo_zstore, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zscan, arginfo_kscan, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zunion, arginfo_zinterunion, ZEND_ACC_PUBLIC) - PHP_ME(Redis, zunionstore, arginfo_zstore, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - static const zend_module_dep redis_deps[] = { #ifdef HAVE_REDIS_IGBINARY ZEND_MOD_REQUIRED("igbinary") @@ -853,7 +469,7 @@ PHP_MINIT_FUNCTION(redis) REGISTER_INI_ENTRIES(); /* Redis class */ - INIT_CLASS_ENTRY(redis_class_entry, "Redis", redis_functions); + INIT_CLASS_ENTRY(redis_class_entry, "Redis", redis_get_methods()); redis_ce = zend_register_internal_class(&redis_class_entry); redis_ce->create_object = create_redis_object; @@ -1195,7 +811,7 @@ PHP_METHOD(Redis, setnx) /* {{{ proto string Redis::getSet(string key, string value) */ -PHP_METHOD(Redis, getSet) +PHP_METHOD(Redis, getset) { REDIS_PROCESS_KW_CMD("GETSET", redis_kv_cmd, redis_string_response); } |