ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Writer_OpenDocument_MetaInf Class Reference
+ Inheritance diagram for PHPExcel_Writer_OpenDocument_MetaInf:
+ Collaboration diagram for PHPExcel_Writer_OpenDocument_MetaInf:

Public Member Functions

 writeManifest (PHPExcel $pPHPExcel=null)
 Write META-INF/manifest.xml to XML format. More...
 
- Public Member Functions inherited from PHPExcel_Writer_Excel2007_WriterPart
 setParentWriter (PHPExcel_Writer_IWriter $pWriter=null)
 Set parent IWriter object. More...
 
 getParentWriter ()
 Get parent IWriter object. More...
 
 __construct (PHPExcel_Writer_IWriter $pWriter=null)
 Set parent IWriter object. More...
 

Detailed Description

Definition at line 37 of file MetaInf.php.

Member Function Documentation

◆ writeManifest()

PHPExcel_Writer_OpenDocument_MetaInf::writeManifest ( PHPExcel  $pPHPExcel = null)

Write META-INF/manifest.xml to XML format.

Parameters
PHPExcel$pPHPExcel
Returns
string XML Output
Exceptions
PHPExcel_Writer_Exception

Definition at line 46 of file MetaInf.php.

References $objWriter, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.

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  }
getParentWriter()
Get parent IWriter object.
Definition: WriterPart.php:61
$objWriter
const STORAGE_MEMORY
Temporary storage method.
Definition: XMLWriter.php:46
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: