Skip to content

Commit 6013b13

Browse files
committed
Added serialization doc.
1 parent d7c9e41 commit 6013b13

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.markdown

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,42 @@ $redis->connect('127.0.0.1'); // port 6379 by default
8787
$redis->connect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout.
8888
$redis->connect('/tmp/redis.sock'); // unix domain socket.
8989

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+
90126
## ping
91127
##### *Description*
92128

0 commit comments

Comments
 (0)