CompositeProtocolProcessor
in package
implements
ProtocolProcessorInterface
Composite protocol processor for the standard Redis wire protocol using pluggable handlers to serialize requests and deserialize responses.
Tags
Interfaces, Classes and Traits
- ProtocolProcessorInterface
- Defines a pluggable protocol processor capable of serializing commands and deserializing responses into PHP objects directly from a connection.
Table of Contents
- $reader : mixed
- $serializer : mixed
- __construct() : mixed
- getRequestSerializer() : RequestSerializerInterface
- Returns the request serializer used by the protocol processor.
- getResponseReader() : ResponseReaderInterface
- Returns the Response reader used by the protocol processor.
- read() : mixed
- Reads a response from a connection to Redis.
- setRequestSerializer() : mixed
- Sets the request serializer used by the protocol processor.
- setResponseReader() : mixed
- Sets the response reader used by the protocol processor.
- write() : mixed
- Writes a request over a connection to Redis.
Properties
$reader
protected
mixed
$reader
$serializer
protected
mixed
$serializer
Methods
__construct()
public
__construct([RequestSerializerInterface $serializer = null ][, ResponseReaderInterface $reader = null ]) : mixed
Parameters
- $serializer : RequestSerializerInterface = null
-
Request serializer.
- $reader : ResponseReaderInterface = null
-
Response reader.
Return values
mixed —getRequestSerializer()
Returns the request serializer used by the protocol processor.
public
getRequestSerializer() : RequestSerializerInterface
Return values
RequestSerializerInterface —getResponseReader()
Returns the Response reader used by the protocol processor.
public
getResponseReader() : ResponseReaderInterface
Return values
ResponseReaderInterface —read()
Reads a response from a connection to Redis.
public
read(CompositeConnectionInterface $connection) : mixed
Parameters
- $connection : CompositeConnectionInterface
-
Redis connection.
Return values
mixed —setRequestSerializer()
Sets the request serializer used by the protocol processor.
public
setRequestSerializer(RequestSerializerInterface $serializer) : mixed
Parameters
- $serializer : RequestSerializerInterface
-
Request serializer.
Return values
mixed —setResponseReader()
Sets the response reader used by the protocol processor.
public
setResponseReader(ResponseReaderInterface $reader) : mixed
Parameters
- $reader : ResponseReaderInterface
-
Response reader.
Return values
mixed —write()
Writes a request over a connection to Redis.
public
write(CompositeConnectionInterface $connection, CommandInterface $command) : mixed
Parameters
- $connection : CompositeConnectionInterface
-
Redis connection.
- $command : CommandInterface
-
Command instance.