Skip to content

Commit 1cbdbca

Browse files
committed
Added missing parameters to connect/pconnect
$persistent_id/$reserved and $retry_interval were missing.
1 parent dd9f759 commit 1cbdbca

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/Redis.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ public function __construct( ) {}
9494
* @param string $host can be a host, or the path to a unix domain socket
9595
* @param int $port optional
9696
* @param float $timeout value in seconds (optional, default is 0.0 meaning unlimited)
97+
* @param null $reserved should be null if $retry_interval is specified
98+
* @param int $retry_interval retry interval in milliseconds.
9799
* @return bool TRUE on success, FALSE on error.
98100
* @example
99101
* <pre>
@@ -103,15 +105,17 @@ public function __construct( ) {}
103105
* $redis->connect('/tmp/redis.sock'); // unix domain socket.
104106
* </pre>
105107
*/
106-
public function connect( $host, $port = 6379, $timeout = 0.0 ) {}
108+
public function connect( $host, $port = 6379, $timeout = 0.0, $reserved = null, $retry_interval = 0 ) {}
107109

108110
/**
109111
* @see connect()
110112
* @param string $host
111113
* @param int $port
112114
* @param float $timeout
115+
* @param null $reserved
116+
* @param int $retry_interval
113117
*/
114-
public function open( $host, $port = 6379, $timeout = 0.0 ) {}
118+
public function open( $host, $port = 6379, $timeout = 0.0, $reserved = null, $retry_interval = 0 ) {}
115119

116120
/**
117121
* Connects to a Redis instance or reuse a connection already established with pconnect/popen.
@@ -129,6 +133,8 @@ public function open( $host, $port = 6379, $timeout = 0.0 ) {}
129133
* @param string $host can be a host, or the path to a unix domain socket
130134
* @param int $port optional
131135
* @param float $timeout value in seconds (optional, default is 0 meaning unlimited)
136+
* @param string $persistent_id unique identifier string for the connection
137+
* @param int $retry_interval retry time in milliseconds
132138
* @return bool TRUE on success, FALSE on error.
133139
* @example
134140
* <pre>
@@ -138,15 +144,17 @@ public function open( $host, $port = 6379, $timeout = 0.0 ) {}
138144
* $redis->connect('/tmp/redis.sock'); // unix domain socket.
139145
* </pre>
140146
*/
141-
public function pconnect( $host, $port = 6379, $timeout = 0.0 ) {}
147+
public function pconnect( $host, $port = 6379, $timeout = 0.0, $persistent_id = '', $retry_interval = 0 ) {}
142148

143149
/**
144150
* @see pconnect()
145151
* @param string $host
146152
* @param int $port
147153
* @param float $timeout
154+
* @param string $persistent_id
155+
* @param int $retry_interval
148156
*/
149-
public function popen( $host, $port = 6379, $timeout = 0.0 ) {}
157+
public function popen( $host, $port = 6379, $timeout = 0.0, $persistent_id = '', $retry_interval = 0 ) {}
150158

151159
/**
152160
* Disconnects from the Redis instance, except when pconnect is used.

0 commit comments

Comments
 (0)