123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?php
- namespace Predis\Iterator;
- use Predis\ResponseObjectInterface;
- abstract class MultiBulkResponse implements \Iterator, \Countable, ResponseObjectInterface
- {
- protected $position;
- protected $current;
- protected $replySize;
-
- public function rewind()
- {
-
- }
-
- public function current()
- {
- return $this->current;
- }
-
- public function key()
- {
- return $this->position;
- }
-
- public function next()
- {
- if (++$this->position < $this->replySize) {
- $this->current = $this->getValue();
- }
- return $this->position;
- }
-
- public function valid()
- {
- return $this->position < $this->replySize;
- }
-
- public function count()
- {
- return $this->replySize;
- }
-
- public function getPosition()
- {
- return $this->position;
- }
-
- abstract protected function getValue();
- }
|