PHP Класс Predis\Collection\Iterator\ListKey

This iterator tries to emulate the behaviour of cursor-based iterators based on the SCAN-family of commands introduced in Redis <= 2.8, meaning that due to its incremental nature with multiple fetches it can only offer limited guarantees on the returned elements because the collection can change several times (trimmed, deleted, overwritten) during the iteration process.
Автор: Daniele Alessandri ([email protected])
Наследование: implements Iterator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$client
$count
$current
$elements
$fetchmore
$key
$position
$valid

Открытые методы

Метод Описание
__construct ( Predis\ClientInterface $client, string $key, integer $count = 10 )
current ( )
key ( )
next ( )
rewind ( )
valid ( )

Защищенные методы

Метод Описание
executeCommand ( ) : array Fetches a new set of elements from the remote collection, effectively advancing the iteration process.
extractNext ( ) Extracts next values for key() and current().
fetch ( ) Populates the local buffer of elements fetched from the server during the iteration.
requiredCommand ( Predis\ClientInterface $client, string $commandID ) Ensures that the client instance supports the specified Redis command required to fetch elements from the server to perform the iteration.
reset ( ) Resets the inner state of the iterator.

Описание методов

__construct() публичный метод

public __construct ( Predis\ClientInterface $client, string $key, integer $count = 10 )
$client Predis\ClientInterface Client connected to Redis.
$key string Redis list key.
$count integer Number of items retrieved on each fetch operation.

current() публичный метод

public current ( )

executeCommand() защищенный метод

Fetches a new set of elements from the remote collection, effectively advancing the iteration process.
protected executeCommand ( ) : array
Результат array

extractNext() защищенный метод

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

fetch() защищенный метод

Populates the local buffer of elements fetched from the server during the iteration.
protected fetch ( )

key() публичный метод

public key ( )

next() публичный метод

public next ( )

requiredCommand() защищенный метод

Ensures that the client instance supports the specified Redis command required to fetch elements from the server to perform the iteration.
protected requiredCommand ( Predis\ClientInterface $client, string $commandID )
$client Predis\ClientInterface Client connected to Redis.
$commandID string Command ID.

reset() защищенный метод

Resets the inner state of the iterator.
protected reset ( )

rewind() публичный метод

public rewind ( )

valid() публичный метод

public valid ( )

Описание свойств

$client защищенное свойство

protected $client

$count защищенное свойство

protected $count

$current защищенное свойство

protected $current

$elements защищенное свойство

protected $elements

$fetchmore защищенное свойство

protected $fetchmore

$key защищенное свойство

protected $key

$position защищенное свойство

protected $position

$valid защищенное свойство

protected $valid