ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
MetaInf.php
Go to the documentation of this file.
1 <?php
38 {
46  public function writeManifest(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  // Manifest
63  $objWriter->startElement('manifest:manifest');
64  $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0');
65  $objWriter->writeAttribute('manifest:version', '1.2');
66 
67  $objWriter->startElement('manifest:file-entry');
68  $objWriter->writeAttribute('manifest:full-path', '/');
69  $objWriter->writeAttribute('manifest:version', '1.2');
70  $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet');
71  $objWriter->endElement();
72  $objWriter->startElement('manifest:file-entry');
73  $objWriter->writeAttribute('manifest:full-path', 'meta.xml');
74  $objWriter->writeAttribute('manifest:media-type', 'text/xml');
75  $objWriter->endElement();
76  $objWriter->startElement('manifest:file-entry');
77  $objWriter->writeAttribute('manifest:full-path', 'settings.xml');
78  $objWriter->writeAttribute('manifest:media-type', 'text/xml');
79  $objWriter->endElement();
80  $objWriter->startElement('manifest:file-entry');
81  $objWriter->writeAttribute('manifest:full-path', 'content.xml');
82  $objWriter->writeAttribute('manifest:media-type', 'text/xml');
83  $objWriter->endElement();
84  $objWriter->startElement('manifest:file-entry');
85  $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png');
86  $objWriter->writeAttribute('manifest:media-type', 'image/png');
87  $objWriter->endElement();
88  $objWriter->startElement('manifest:file-entry');
89  $objWriter->writeAttribute('manifest:full-path', 'styles.xml');
90  $objWriter->writeAttribute('manifest:media-type', 'text/xml');
91  $objWriter->endElement();
92  $objWriter->endElement();
93 
94  return $objWriter->getData();
95  }
96 }
getParentWriter()
Get parent IWriter object.
Definition: WriterPart.php:61
$objWriter
const STORAGE_MEMORY
Temporary storage method.
Definition: XMLWriter.php:46
writeManifest(PHPExcel $pPHPExcel=null)
Write META-INF/manifest.xml to XML format.
Definition: MetaInf.php:46