Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

(no description)

File Size: 120 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Row:: (7 methods):
  __construct()
  __destruct()
  getRowIndex()
  getCellIterator()
  getColumnIterator()
  isEmpty()
  getWorksheet()


Class: Row  - X-Ref

__construct(Worksheet $worksheet, $rowIndex = 1)   X-Ref
Create a new row.

param: int $rowIndex

__destruct()   X-Ref
Destructor.


getRowIndex()   X-Ref
Get row index.


getCellIterator($startColumn = 'A', $endColumn = null)   X-Ref
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

getColumnIterator($startColumn = 'A', $endColumn = null)   X-Ref
Get column iterator. Synonym for getCellIterator().

param: string $startColumn The column address at which to start iterating
param: string $endColumn Optionally, the column address at which to stop iterating

isEmpty(int $definitionOfEmptyFlags = 0, $startColumn = 'A', $endColumn = null)   X-Ref
Returns a boolean true if the row contains no cells. By default, this means that no cell records exist in the
collection for this row. false will be returned otherwise.
This rule can be modified by passing a $definitionOfEmptyFlags value:
1 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL If the only cells in the collection are null value
cells, then the row will be considered empty.
2 - CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are empty
string value cells, then the row will be considered empty.
3 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL
If the only cells in the collection are null value or empty string value cells, then the row
will be considered empty.

param: int $definitionOfEmptyFlags
param: string $startColumn The column address at which to start checking if cells are empty
param: string $endColumn Optionally, the column address at which to stop checking if cells are empty

getWorksheet()   X-Ref
Returns bound worksheet.