updated a couple packages (#1567)
[openemr.git] / vendor / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Worksheet / Row.php
blob2a379d2cd345a55b3f36bd3e0e531a3048c19830
1 <?php
3 namespace PhpOffice\PhpSpreadsheet\Worksheet;
5 class Row
7 /**
8 * \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet.
10 * @var Worksheet
12 private $worksheet;
14 /**
15 * Row index.
17 * @var int
19 private $rowIndex = 0;
21 /**
22 * Create a new row.
24 * @param Worksheet $worksheet
25 * @param int $rowIndex
27 public function __construct(Worksheet $worksheet = null, $rowIndex = 1)
29 // Set parent and row index
30 $this->worksheet = $worksheet;
31 $this->rowIndex = $rowIndex;
34 /**
35 * Destructor.
37 public function __destruct()
39 unset($this->worksheet);
42 /**
43 * Get row index.
45 * @return int
47 public function getRowIndex()
49 return $this->rowIndex;
52 /**
53 * Get cell iterator.
55 * @param string $startColumn The column address at which to start iterating
56 * @param string $endColumn Optionally, the column address at which to stop iterating
58 * @return RowCellIterator
60 public function getCellIterator($startColumn = 'A', $endColumn = null)
62 return new RowCellIterator($this->worksheet, $this->rowIndex, $startColumn, $endColumn);
65 /**
66 * Returns bound worksheet.
68 * @return Worksheet
70 public function getWorksheet()
72 return $this->worksheet;