PHP Class Predis\Collection\Iterator\CursorBasedIterator

Given their incremental nature with multiple fetches, these kind of iterators offer limited guarantees about the returned elements because the collection can change several times during the iteration process.
See also: http://redis.io/commands/scan
Author: Daniele Alessandri ([email protected])
Inheritance: implements Iterator
Afficher le fichier Open project: nrk/predis Class Usage Examples

Protected Properties

Свойство Type Description
$client
$count
$current
$cursor
$elements
$fetchmore
$match
$position
$valid

Méthodes publiques

Méthode Description
__construct ( Predis\ClientInterface $client, string $match = null, integer $count = null )
current ( )
key ( )
next ( )
rewind ( )
valid ( )

Méthodes protégées

Méthode Description
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.
getScanOptions ( ) : array Returns an array of options for the SCAN command.
requiredCommand ( Predis\ClientInterface $client, string $commandID ) Ensures that the client supports the specified Redis command required to fetch elements from the server to perform the iteration.
reset ( ) Resets the inner state of the iterator.

Method Details

__construct() public méthode

public __construct ( Predis\ClientInterface $client, string $match = null, integer $count = null )
$client Predis\ClientInterface Client connected to Redis.
$match string Pattern to match during the server-side iteration.
$count integer Hint used by Redis to compute the number of results per iteration.

current() public méthode

public current ( )

executeCommand() abstract protected méthode

Fetches a new set of elements from the remote collection, effectively advancing the iteration process.
abstract protected executeCommand ( ) : array
Résultat array

extractNext() protected méthode

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

fetch() protected méthode

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

getScanOptions() protected méthode

Returns an array of options for the SCAN command.
protected getScanOptions ( ) : array
Résultat array

key() public méthode

public key ( )

next() public méthode

public next ( )

requiredCommand() protected méthode

Ensures that the client 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() protected méthode

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

rewind() public méthode

public rewind ( )

valid() public méthode

public valid ( )

Property Details

$client protected_oe property

protected $client

$count protected_oe property

protected $count

$current protected_oe property

protected $current

$cursor protected_oe property

protected $cursor

$elements protected_oe property

protected $elements

$fetchmore protected_oe property

protected $fetchmore

$match protected_oe property

protected $match

$position protected_oe property

protected $position

$valid protected_oe property

protected $valid