Documentation

CommandInterface

Defines an abstraction representing a Redis command.

Tags
author

Daniele Alessandri suppakilla@gmail.com

Table of Contents

getArgument()  : mixed|null
Gets the argument of the command at the specified index.
getArguments()  : array<string|int, mixed>
Gets the arguments of the command.
getId()  : string
Returns the ID of the Redis command. By convention, command identifiers must always be uppercase.
getSlot()  : int|null
Returns the assigned slot of the command for clustering distribution.
parseResponse()  : mixed
Parses a raw response and returns a PHP object.
setArguments()  : mixed
Sets the arguments for the command.
setRawArguments()  : mixed
Sets the raw arguments for the command without processing them.
setSlot()  : mixed
Assign the specified slot to the command for clustering distribution.

Methods

getArgument()

Gets the argument of the command at the specified index.

public getArgument(int $index) : mixed|null
Parameters
$index : int

Index of the desired argument.

Return values
mixed|null

getArguments()

Gets the arguments of the command.

public getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed>

getId()

Returns the ID of the Redis command. By convention, command identifiers must always be uppercase.

public getId() : string
Return values
string

getSlot()

Returns the assigned slot of the command for clustering distribution.

public getSlot() : int|null
Return values
int|null

parseResponse()

Parses a raw response and returns a PHP object.

public parseResponse(string $data) : mixed
Parameters
$data : string

Binary string containing the whole response.

Return values
mixed

setArguments()

Sets the arguments for the command.

public setArguments(array<string|int, mixed> $arguments) : mixed
Parameters
$arguments : array<string|int, mixed>

List of arguments.

Return values
mixed

setRawArguments()

Sets the raw arguments for the command without processing them.

public setRawArguments(array<string|int, mixed> $arguments) : mixed
Parameters
$arguments : array<string|int, mixed>

List of arguments.

Return values
mixed

setSlot()

Assign the specified slot to the command for clustering distribution.

public setSlot(int $slot) : mixed
Parameters
$slot : int

Slot ID.

Return values
mixed

Search results