/** * @param TableRow|null $row * * @return $this */ public function setRow(TableRow $row = null) { $this->row = $row; if (null !== $row && !in_array($this, $row->getCells())) { $row->addCell($this); } return $this; }
public function setAutoData($data) { for ($i = 0; $i < count($data); $i++) { $row = new TableRow(null); for ($j = 0; $j < count($data[$i]); $j++) { $cell = new TableCell("s59", $data[$i][$j]); $row->addCell($cell); } $this->addTableRow($row); } }