@@ -89,12 +89,13 @@ public function __construct( ) {}
89
89
/**
90
90
* Connects to a Redis instance.
91
91
*
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.
98
99
* @example
99
100
* <pre>
100
101
* $redis->connect('127.0.0.1', 6379);
@@ -103,7 +104,7 @@ public function __construct( ) {}
103
104
* $redis->connect('/tmp/redis.sock'); // unix domain socket.
104
105
* </pre>
105
106
*/
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 ) {}
107
108
108
109
/**
109
110
* A method to determine if a phpredis object thinks it's connected to a server
@@ -118,8 +119,10 @@ public function isConnected() {}
118
119
* @param float $timeout
119
120
* @param null $reserved
120
121
* @param int $retry_interval
122
+ * @param float $read_timeout
123
+ * @return bool
121
124
*/
122
- public function open ( $ host , $ port = 6379 , $ timeout = 0.0 , $ reserved = null , $ retry_interval = 0 ) {}
125
+ public function open ( $ host , $ port = 6379 , $ timeout = 0.0 , $ reserved = null , $ retry_interval = 0 , $ read_timeout = 0.0 ) {}
123
126
124
127
/**
125
128
* Connects to a Redis instance or reuse a connection already established with pconnect/popen.
@@ -129,26 +132,27 @@ public function open( $host, $port = 6379, $timeout = 0.0, $reserved = null, $re
129
132
* many servers connecting to one redis server.
130
133
*
131
134
* Also more than one persistent connection can be made identified by either host + port + timeout
132
- * or unix socket + timeout.
135
+ * or host + persistent_id or unix socket + timeout.
133
136
*
134
137
* This feature is not available in threaded versions. pconnect and popen then working like their non persistent
135
138
* equivalents.
136
139
*
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
140
+ * @param string $host can be a host, or the path to a unix domain socket
141
+ * @param int $port optional
142
+ * @param float $timeout value in seconds (optional, default is 0 meaning unlimited)
143
+ * @param string $persistent_id identity for the requested persistent connection
144
+ * @param int $retry_interval retry interval in milliseconds.
145
+ * @param float $read_timeout value in seconds (optional, default is 0 meaning unlimited)
146
+ * @return bool TRUE on success, FALSE on ertcnror.
144
147
* <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.
148
+ * $redis->pconnect('127.0.0.1', 6379);
149
+ * $redis->pconnect('127.0.0.1'); // port 6379 by default - same connection like before.
150
+ * $redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection than the two before.
151
+ * $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.
152
+ * $redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection than the four before.
149
153
* </pre>
150
154
*/
151
- public function pconnect ( $ host , $ port = 6379 , $ timeout = 0.0 , $ persistent_id = '' , $ retry_interval = 0 ) {}
155
+ public function pconnect ( $ host , $ port = 6379 , $ timeout = 0.0 , $ persistent_id = null , $ retry_interval = 0 , $ read_timeout = 0. 0 ) {}
152
156
153
157
/**
154
158
* @see pconnect()
@@ -157,8 +161,10 @@ public function pconnect( $host, $port = 6379, $timeout = 0.0, $persistent_id =
157
161
* @param float $timeout
158
162
* @param string $persistent_id
159
163
* @param int $retry_interval
164
+ * @param float $read_timeout
165
+ * @return bool
160
166
*/
161
- public function popen ( $ host , $ port = 6379 , $ timeout = 0.0 , $ persistent_id = '' , $ retry_interval = 0 ) {}
167
+ public function popen ( $ host , $ port = 6379 , $ timeout = 0.0 , $ persistent_id = '' , $ retry_interval = 0 , $ read_timeout = 0.0 ) {}
162
168
163
169
/**
164
170
* Disconnects from the Redis instance, except when pconnect is used.
0 commit comments