ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Row.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class Row
6 {
12  private $worksheet;
13 
19  private $rowIndex = 0;
20 
27  public function __construct(?Worksheet $worksheet = null, $rowIndex = 1)
28  {
29  // Set parent and row index
30  $this->worksheet = $worksheet;
31  $this->rowIndex = $rowIndex;
32  }
33 
37  public function __destruct()
38  {
39  // @phpstan-ignore-next-line
40  $this->worksheet = null;
41  }
42 
46  public function getRowIndex(): int
47  {
48  return $this->rowIndex;
49  }
50 
59  public function getCellIterator($startColumn = 'A', $endColumn = null)
60  {
61  return new RowCellIterator($this->worksheet, $this->rowIndex, $startColumn, $endColumn);
62  }
63 
67  public function getWorksheet(): Worksheet
68  {
69  return $this->worksheet;
70  }
71 }
getRowIndex()
Get row index.
Definition: Row.php:46
getWorksheet()
Returns bound worksheet.
Definition: Row.php:67
__construct(?Worksheet $worksheet=null, $rowIndex=1)
Create a new row.
Definition: Row.php:27
getCellIterator($startColumn='A', $endColumn=null)
Get cell iterator.
Definition: Row.php:59