Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2021-02-28 00:12:23 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2021-02-28 00:17:20 +0300
commit037dbbf93db7db96633b0dd21c995b64af7aa1b9 (patch)
tree5a3c8a22dd57b1d2f9bfbbfa54da8db5a0d94fa3 /redis.c
parent1f2a7ef6b5ea9c032e6075b2c21e0cf57bd11c3f (diff)
[WIP] Issue #1894
Add Redis::copy command
Diffstat (limited to 'redis.c')
-rw-r--r--redis.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/redis.c b/redis.c
index 8beeef2b..0c4e2c29 100644
--- a/redis.c
+++ b/redis.c
@@ -134,6 +134,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_config, 0, 0, 2)
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()
@@ -283,6 +289,7 @@ static zend_function_entry redis_functions[] = {
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)
@@ -3535,6 +3542,12 @@ PHP_METHOD(Redis, command) {
}
/* }}} */
+/* {{{ proto array Redis::copy(string $source, string $destination, array $options = null) */
+PHP_METHOD(Redis, copy) {
+ REDIS_PROCESS_CMD(copy, redis_1_response)
+}
+/* }}} */
+
/* Helper to format any combination of SCAN arguments */
PHP_REDIS_API int
redis_build_scan_cmd(char **cmd, REDIS_SCAN_TYPE type, char *key, int key_len,