ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Column.php
Go to the documentation of this file.
1<?php
2
4
5class Column
6{
12 private $parent;
13
19 private $columnIndex;
20
27 public function __construct(?Worksheet $parent = null, $columnIndex = 'A')
28 {
29 // Set parent and column index
30 $this->parent = $parent;
31 $this->columnIndex = $columnIndex;
32 }
33
37 public function __destruct()
38 {
39 // @phpstan-ignore-next-line
40 $this->parent = null;
41 }
42
46 public function getColumnIndex(): string
47 {
48 return $this->columnIndex;
49 }
50
59 public function getCellIterator($startRow = 1, $endRow = null)
60 {
61 return new ColumnCellIterator($this->parent, $this->columnIndex, $startRow, $endRow);
62 }
63}
An exception for terminatinating execution or to throw for unit testing.
__construct(?Worksheet $parent=null, $columnIndex='A')
Create a new column.
Definition: Column.php:27
getCellIterator($startRow=1, $endRow=null)
Get cell iterator.
Definition: Column.php:59
getColumnIndex()
Get column index as string eg: 'A'.
Definition: Column.php:46