File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,42 @@ $redis->connect('127.0.0.1'); // port 6379 by default
87
87
$redis->connect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout.
88
88
$redis->connect('/tmp/redis.sock'); // unix domain socket.
89
89
90
+
91
+ ## setOption
92
+ ##### * Description*
93
+ Set client option.
94
+
95
+ ##### * Parameters*
96
+ * parameter name*
97
+ * parameter value*
98
+
99
+ ##### * Return value*
100
+ * BOOL* : ` TRUE ` on success, ` FALSE ` on error.
101
+
102
+ ##### * Example*
103
+ <pre >
104
+ $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE); // don't serialize data
105
+ $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP); // use built-in serialize/unserialize
106
+ $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY); // use igBinary serialize/unserialize
107
+ </pre >
108
+
109
+
110
+ ## getOption
111
+ ##### * Description*
112
+ Get client option.
113
+
114
+ ##### * Parameters*
115
+ * parameter name*
116
+
117
+ ##### * Return value*
118
+ Parameter value.
119
+
120
+ ##### * Example*
121
+ <pre >
122
+ $redis->getOption(Redis::OPT_SERIALIZER); // return Redis::SERIALIZER_NONE, Redis::SERIALIZER_PHP, or Redis::SERIALIZER_IGBINARY.
123
+ </pre >
124
+
125
+
90
126
## ping
91
127
##### * Description*
92
128
You can’t perform that action at this time.
0 commit comments