Documentation

HashKey extends CursorBasedIterator
in package

Abstracts the iteration of fields and values of an hash by leveraging the HSCAN command (Redis >= 2.8) wrapped in a fully-rewindable PHP iterator.

Tags
author

Daniele Alessandri suppakilla@gmail.com

link
http://redis.io/commands/scan

Table of Contents

$client  : mixed
$count  : mixed
$current  : mixed
$cursor  : mixed
$elements  : mixed
$fetchmore  : mixed
$key  : mixed
$match  : mixed
$position  : mixed
$valid  : mixed
__construct()  : mixed
current()  : mixed
{@inheritdoc}
key()  : mixed
{@inheritdoc}
next()  : mixed
{@inheritdoc}
rewind()  : mixed
{@inheritdoc}
valid()  : mixed
{@inheritdoc}
executeCommand()  : array<string|int, mixed>
Fetches a new set of elements from the remote collection, effectively advancing the iteration process.
extractNext()  : mixed
Extracts next values for key() and current().
fetch()  : mixed
Populates the local buffer of elements fetched from the server during the iteration.
getScanOptions()  : array<string|int, mixed>
Returns an array of options for the `SCAN` command.
requiredCommand()  : mixed
Ensures that the client supports the specified Redis command required to fetch elements from the server to perform the iteration.
reset()  : mixed
Resets the inner state of the iterator.

Properties

Methods

__construct()

public __construct(ClientInterface $client, mixed $key[, mixed $match = null ][, mixed $count = null ]) : mixed
Parameters
$client : ClientInterface

Client connected to Redis.

$key : mixed
$match : mixed = null

Pattern to match during the server-side iteration.

$count : mixed = null

Hint used by Redis to compute the number of results per iteration.

Return values
mixed

executeCommand()

Fetches a new set of elements from the remote collection, effectively advancing the iteration process.

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

extractNext()

Extracts next values for key() and current().

protected extractNext() : mixed
Return values
mixed

fetch()

Populates the local buffer of elements fetched from the server during the iteration.

protected fetch() : mixed
Return values
mixed

getScanOptions()

Returns an array of options for the `SCAN` command.

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

requiredCommand()

Ensures that the client supports the specified Redis command required to fetch elements from the server to perform the iteration.

protected requiredCommand(ClientInterface $client, string $commandID) : mixed
Parameters
$client : ClientInterface

Client connected to Redis.

$commandID : string

Command ID.

Tags
throws
NotSupportedException
Return values
mixed

reset()

Resets the inner state of the iterator.

protected reset() : mixed
Return values
mixed

Search results