123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace Predis\Collection\Iterator;
- use Predis\ClientInterface;
- class SortedSetKey extends CursorBasedIterator
- {
- protected $key;
-
- public function __construct(ClientInterface $client, $key, $match = null, $count = null)
- {
- $this->requiredCommand($client, 'ZSCAN');
- parent::__construct($client, $match, $count);
- $this->key = $key;
- }
-
- protected function executeCommand()
- {
- return $this->client->zscan($this->key, $this->cursor, $this->getScanOptions());
- }
-
- protected function extractNext()
- {
- $element = array_shift($this->elements);
- $this->position = $element[0];
- $this->current = $element[1];
- }
- }
|