| 1 | <?php |
||
| 17 | class CountIterator implements InfiniteIterableInterface |
||
| 18 | { |
||
| 19 | use InfiniteIterableTrait; |
||
| 20 | |||
| 21 | /** @var integer */ |
||
| 22 | protected $start; |
||
| 23 | |||
| 24 | /** @var integer */ |
||
| 25 | protected $step; |
||
| 26 | |||
| 27 | /** @var integer */ |
||
| 28 | protected $key; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * CountIterator constructor. |
||
| 32 | * |
||
| 33 | * @param integer $start |
||
| 34 | * @param integer $step |
||
| 35 | */ |
||
| 36 | 31 | public function __construct($start, $step) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @{inheritDoc} |
||
| 45 | */ |
||
| 46 | 31 | public function rewind() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @{inheritDoc} |
||
| 53 | */ |
||
| 54 | 31 | public function current() |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @{inheritDoc} |
||
| 61 | */ |
||
| 62 | 31 | public function key() |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @{inheritDoc} |
||
| 69 | */ |
||
| 70 | 31 | public function next() |
|
| 74 | |||
| 75 | /** |
||
| 76 | * @{inheritDoc} |
||
| 77 | */ |
||
| 78 | 31 | public function valid() |
|
| 82 | |||
| 83 | /** |
||
| 84 | * This method is called by var_dump() when dumping an object to get the properties that should be shown. |
||
| 85 | * |
||
| 86 | * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.debuginfo |
||
| 87 | * @return array |
||
| 88 | */ |
||
| 89 | 1 | public function __debugInfo() |
|
| 101 | } |
||
| 102 |