Completed
Pull Request — develop (#187)
by Franck
19:04 queued 41s
created

PptTableProps::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 18
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
namespace PhpOffice\PhpPresentation\Writer\PowerPoint2007;
3
4
use PhpOffice\Common\XMLWriter;
5
6
class PptTableProps extends AbstractDecoratorWriter
7
{
8
    public function render()
9
    {
10
        // Create XML writer
11
        $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);
12
13
        // XML header
14
        $objWriter->startDocument('1.0', 'UTF-8', 'yes');
15
16
        // a:tblStyleLst
17
        $objWriter->startElement('a:tblStyleLst');
18
        $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main');
19
        $objWriter->writeAttribute('def', '{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}');
20
        $objWriter->endElement();
21
22
        $this->getZip()->addFromString('ppt/tableStyles.xml', $objWriter->getData());
23
24
        return $this->getZip();
25
    }
26
}
27