Documentation

ResponseReader
in package
implements ResponseReaderInterface

Response reader for the standard Redis wire protocol.

Tags
link
http://redis.io/topics/protocol
author

Daniele Alessandri suppakilla@gmail.com

Interfaces, Classes and Traits

ResponseReaderInterface
Defines a pluggable reader capable of parsing responses returned by Redis and deserializing them to PHP objects.

Table of Contents

$handlers  : mixed
__construct()  : mixed
getHandler()  : ResponseHandlerInterface
Returns the response handler associated to a certain type of response.
read()  : mixed
Reads a response from a connection to Redis.
setHandler()  : mixed
Sets the handler for the specified prefix identifying the response type.
getDefaultHandlers()  : array<string|int, mixed>
Returns the default handlers for the supported type of responses.
onProtocolError()  : mixed
Handles protocol errors generated while reading responses from a connection.

Properties

Methods

__construct()

public __construct() : mixed
Return values
mixed

setHandler()

Sets the handler for the specified prefix identifying the response type.

public setHandler(string $prefix, ResponseHandlerInterface $handler) : mixed
Parameters
$prefix : string

Identifier of the type of response.

$handler : ResponseHandlerInterface

Response handler.

Return values
mixed

getDefaultHandlers()

Returns the default handlers for the supported type of responses.

protected getDefaultHandlers() : array<string|int, mixed>
Return values
array<string|int, mixed>

onProtocolError()

Handles protocol errors generated while reading responses from a connection.

protected onProtocolError(CompositeConnectionInterface $connection, string $message) : mixed
Parameters
$connection : CompositeConnectionInterface

Redis connection that generated the error.

$message : string

Error message.

Return values
mixed

Search results