PhpOffice\PhpPresentation\Shape\Table::createRow PHP Method

createRow() public method

Create row
public createRow ( ) : PhpOffice\PhpPresentation\Shape\Table\Row
return PhpOffice\PhpPresentation\Shape\Table\Row
    public function createRow()
    {
        $row = new Row($this->columnCount);
        $this->rows[] = $row;
        return $row;
    }

Usage Example

Example #1
0
 public function testRows()
 {
     $object = new Table();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Table\\Row', $object->createRow());
     $this->assertCount(1, $object->getRows());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Table\\Row', $object->getRow(0));
     $this->assertNull($object->getRow(1, true));
 }