ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Settings.php
Go to the documentation of this file.
1<?php
38{
46 public function write(PHPExcel $pPHPExcel = null)
47 {
48 if (!$pPHPExcel) {
49 $pPHPExcel = $this->getParentWriter()->getPHPExcel();
50 }
51
52 $objWriter = null;
53 if ($this->getParentWriter()->getUseDiskCaching()) {
55 } else {
57 }
58
59 // XML header
60 $objWriter->startDocument('1.0', 'UTF-8');
61
62 // Settings
63 $objWriter->startElement('office:document-settings');
64 $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');
65 $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
66 $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0');
67 $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');
68 $objWriter->writeAttribute('office:version', '1.2');
69
70 $objWriter->startElement('office:settings');
71 $objWriter->startElement('config:config-item-set');
72 $objWriter->writeAttribute('config:name', 'ooo:view-settings');
73 $objWriter->startElement('config:config-item-map-indexed');
74 $objWriter->writeAttribute('config:name', 'Views');
75 $objWriter->endElement();
76 $objWriter->endElement();
77 $objWriter->startElement('config:config-item-set');
78 $objWriter->writeAttribute('config:name', 'ooo:configuration-settings');
79 $objWriter->endElement();
80 $objWriter->endElement();
81 $objWriter->endElement();
82
83 return $objWriter->getData();
84 }
85}
$objWriter
An exception for terminatinating execution or to throw for unit testing.
const STORAGE_MEMORY
Temporary storage method.
Definition: XMLWriter.php:46
getParentWriter()
Get parent IWriter object.
Definition: WriterPart.php:61
write(PHPExcel $pPHPExcel=null)
Write settings.xml to XML format.
Definition: Settings.php:46