62 if (
$startRow > $this->subject->getHighestRow()) {
64 "Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})" 69 if ($this->endRow < $this->startRow) {
86 $this->endRow =
$endRow ?: $this->subject->getHighestRow();
100 if (($row < $this->startRow) || (
$row > $this->endRow)) {
103 $this->position =
$row;
123 return new Row($this->subject, $this->position);
129 public function key(): int
155 return $this->position <= $this->endRow && $this->position >=
$this->startRow;
resetEnd($endRow=null)
(Re)Set the end row.
valid()
Indicate if more rows exist in the worksheet range of rows that we're iterating.
rewind()
Rewind the iterator to the starting row.
next()
Set the iterator to its next value.
key()
Return the current iterator key.
resetStart(int $startRow=1)
(Re)Set the start row and the current row pointer.
__construct(Worksheet $subject, $startRow=1, $endRow=null)
Create a new row iterator.
prev()
Set the iterator to its previous value.
seek(int $row=1)
Set the row pointer to the selected row.
current()
Return the current row in this worksheet.