mirror of
https://github.com/predis/predis.git
synced 2026-10-10 13:57:22 +00:00
Rework the API for external protocol processors.
This commit is contained in:
@@ -23,7 +23,7 @@ use Predis\Protocol\Text\TextProtocol;
|
||||
*/
|
||||
class ComposableStreamConnection extends StreamConnection implements ComposableConnectionInterface
|
||||
{
|
||||
private $protocol;
|
||||
protected $protocol;
|
||||
|
||||
/**
|
||||
* @param ConnectionParametersInterface $parameters Parameters used to initialize the connection.
|
||||
@@ -35,18 +35,6 @@ class ComposableStreamConnection extends StreamConnection implements ComposableC
|
||||
$this->protocol = $protocol ?: new TextProtocol();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setProtocol(ProtocolInterface $protocol)
|
||||
{
|
||||
if ($protocol === null) {
|
||||
throw new \InvalidArgumentException("The protocol instance cannot be a null value");
|
||||
}
|
||||
|
||||
$this->protocol = $protocol;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user