mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
Add the ability to set a different protocol processor on connection instances.
This commit is contained in:
@@ -1158,6 +1158,7 @@ interface IConnection {
|
||||
interface IConnectionSingle extends IConnection {
|
||||
public function getParameters();
|
||||
public function getProtocol();
|
||||
public function setProtocol(IRedisProtocol $protocol);
|
||||
public function __toString();
|
||||
public function writeBytes($buffer);
|
||||
public function readBytes($length);
|
||||
@@ -1237,6 +1238,10 @@ abstract class ConnectionBase implements IConnectionSingle {
|
||||
return $this->_protocol;
|
||||
}
|
||||
|
||||
public function setProtocol(IRedisProtocol $protocol) {
|
||||
$this->_protocol = $protocol;
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
if (!isset($this->_cachedId)) {
|
||||
$this->_cachedId = "{$this->_params->host}:{$this->_params->port}";
|
||||
|
||||
Reference in New Issue
Block a user