@@ -89,12 +89,13 @@ public function __construct( ) {}
8989 /**
9090 * Connects to a Redis instance.
9191 *
92- * @param string $host can be a host, or the path to a unix domain socket
93- * @param int $port optional
94- * @param float $timeout value in seconds (optional, default is 0.0 meaning unlimited)
95- * @param null $reserved should be null if $retry_interval is specified
96- * @param int $retry_interval retry interval in milliseconds.
97- * @return bool TRUE on success, FALSE on error.
92+ * @param string $host can be a host, or the path to a unix domain socket
93+ * @param int $port optional
94+ * @param float $timeout value in seconds (optional, default is 0.0 meaning unlimited)
95+ * @param null $reserved should be null if $retry_interval is specified
96+ * @param int $retry_interval retry interval in milliseconds.
97+ * @param float $read_timeout value in seconds (optional, default is 0 meaning unlimited)
98+ * @return bool TRUE on success, FALSE on error.
9899 * @example
99100 * <pre>
100101 * $redis->connect('127.0.0.1', 6379);
@@ -103,7 +104,7 @@ public function __construct( ) {}
103104 * $redis->connect('/tmp/redis.sock'); // unix domain socket.
104105 * </pre>
105106 */
106- public function connect ( $ host , $ port = 6379 , $ timeout = 0.0 , $ reserved = null , $ retry_interval = 0 ) {}
107+ public function connect ( $ host , $ port = 6379 , $ timeout = 0.0 , $ reserved = null , $ retry_interval = 0 , $ read_timeout = 0.0 ) {}
107108
108109 /**
109110 * A method to determine if a phpredis object thinks it's connected to a server
@@ -129,26 +130,27 @@ public function open( $host, $port = 6379, $timeout = 0.0, $reserved = null, $re
129130 * many servers connecting to one redis server.
130131 *
131132 * Also more than one persistent connection can be made identified by either host + port + timeout
132- * or unix socket + timeout.
133+ * or host + persistent_id or unix socket + timeout.
133134 *
134135 * This feature is not available in threaded versions. pconnect and popen then working like their non persistent
135136 * equivalents.
136137 *
137- * @param string $host can be a host, or the path to a unix domain socket
138- * @param int $port optional
139- * @param float $timeout value in seconds (optional, default is 0 meaning unlimited)
140- * @param string $persistent_id unique identifier string for the connection
141- * @param int $retry_interval retry time in milliseconds
142- * @return bool TRUE on success, FALSE on error.
143- * @example
138+ * @param string $host can be a host, or the path to a unix domain socket
139+ * @param int $port optional
140+ * @param float $timeout value in seconds (optional, default is 0 meaning unlimited)
141+ * @param string $persistent_id identity for the requested persistent connection
142+ * @param int $retry_interval retry interval in milliseconds.
143+ * @param float $read_timeout value in seconds (optional, default is 0 meaning unlimited)
144+ * @return bool TRUE on success, FALSE on ertcnror.
144145 * <pre>
145- * $redis->connect('127.0.0.1', 6379);
146- * $redis->connect('127.0.0.1'); // port 6379 by default
147- * $redis->connect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout.
148- * $redis->connect('/tmp/redis.sock'); // unix domain socket.
146+ * $redis->pconnect('127.0.0.1', 6379);
147+ * $redis->pconnect('127.0.0.1'); // port 6379 by default - same connection like before.
148+ * $redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection than the two before.
149+ * $redis->pconnect('127.0.0.1', 6379, 2.5, 'x'); // x is sent as persistent_id and would be another connection than the three before.
150+ * $redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection than the four before.
149151 * </pre>
150152 */
151- public function pconnect ( $ host , $ port = 6379 , $ timeout = 0.0 , $ persistent_id = '' , $ retry_interval = 0 ) {}
153+ public function pconnect ( $ host , $ port = 6379 , $ timeout = 0.0 , $ persistent_id = null , $ retry_interval = 0 , $ read_timeout = 0. 0 ) {}
152154
153155 /**
154156 * @see pconnect()
@@ -157,8 +159,10 @@ public function pconnect( $host, $port = 6379, $timeout = 0.0, $persistent_id =
157159 * @param float $timeout
158160 * @param string $persistent_id
159161 * @param int $retry_interval
162+ * @param float $read_timeout
163+ * @return bool
160164 */
161- public function popen ( $ host , $ port = 6379 , $ timeout = 0.0 , $ persistent_id = '' , $ retry_interval = 0 ) {}
165+ public function popen ( $ host , $ port = 6379 , $ timeout = 0.0 , $ persistent_id = '' , $ retry_interval = 0 , $ read_timeout = 0.0 ) {}
162166
163167 /**
164168 * Disconnects from the Redis instance, except when pconnect is used.
0 commit comments