Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

(no description)

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

Defines 1 class

Column:: (6 methods):
  __construct()
  __destruct()
  getColumnIndex()
  getCellIterator()
  isEmpty()
  getWorksheet()


Class: Column  - X-Ref

__construct(Worksheet $worksheet, $columnIndex = 'A')   X-Ref
Create a new column.

param: string $columnIndex

__destruct()   X-Ref
Destructor.


getColumnIndex()   X-Ref
Get column index as string eg: 'A'.


getCellIterator($startRow = 1, $endRow = null)   X-Ref
Get cell iterator.

param: int $startRow The row number at which to start iterating
param: int $endRow Optionally, the row number at which to stop iterating
return: ColumnCellIterator

isEmpty(int $definitionOfEmptyFlags = 0)   X-Ref
Returns a boolean true if the column contains no cells. By default, this means that no cell records exist in the
collection for this column. 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 column 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 column 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 column
will be considered empty.

param: int $definitionOfEmptyFlags

getWorksheet()   X-Ref
Returns bound worksheet.