Pass arguments from Row to RowCellIterator and from Column to ColumnCellIterator

This commit is contained in:
MarkBaker 2015-04-26 17:37:48 +01:00
parent ceddc13f82
commit d2b0ef2ad9
2 changed files with 8 additions and 4 deletions

View File

@ -82,9 +82,11 @@ class PHPExcel_Worksheet_Column
/**
* Get cell iterator
*
* @param integer $startRow The row number at which to start iterating
* @param integer $endRow Optionally, the row number at which to stop iterating
* @return PHPExcel_Worksheet_CellIterator
*/
public function getCellIterator() {
return new PHPExcel_Worksheet_ColumnCellIterator($this->_parent, $this->_columnIndex);
public function getCellIterator($startRow = 1, $endRow = null) {
return new PHPExcel_Worksheet_ColumnCellIterator($this->_parent, $this->_columnIndex, $startRow, $endRow);
}
}

View File

@ -82,9 +82,11 @@ class PHPExcel_Worksheet_Row
/**
* Get cell iterator
*
* @param string $startColumn The column address at which to start iterating
* @param string $endColumn Optionally, the column address at which to stop iterating
* @return PHPExcel_Worksheet_CellIterator
*/
public function getCellIterator() {
return new PHPExcel_Worksheet_RowCellIterator($this->_parent, $this->_rowIndex);
public function getCellIterator($startColumn = 'A', $endColumn = null) {
return new PHPExcel_Worksheet_RowCellIterator($this->_parent, $this->_rowIndex, $startColumn, $endColumn);
}
}