12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?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];
- }
- }
|