See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
1 <?php 2 3 namespace PhpOffice\PhpSpreadsheet\Writer\Ods; 4 5 use PhpOffice\PhpSpreadsheet\Shared\XMLWriter; 6 7 class MetaInf extends WriterPart 8 { 9 /** 10 * Write META-INF/manifest.xml to XML format. 11 * 12 * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception 13 * 14 * @return string XML Output 15 */ 16 public function writeManifest() 17 { 18 $objWriter = null; 19 if ($this->getParentWriter()->getUseDiskCaching()) { 20 $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 21 } else { 22 $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); 23 } 24 25 // XML header 26 $objWriter->startDocument('1.0', 'UTF-8'); 27 28 // Manifest 29 $objWriter->startElement('manifest:manifest'); 30 $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0'); 31 $objWriter->writeAttribute('manifest:version', '1.2'); 32 33 $objWriter->startElement('manifest:file-entry'); 34 $objWriter->writeAttribute('manifest:full-path', '/'); 35 $objWriter->writeAttribute('manifest:version', '1.2'); 36 $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet'); 37 $objWriter->endElement(); 38 $objWriter->startElement('manifest:file-entry'); 39 $objWriter->writeAttribute('manifest:full-path', 'meta.xml'); 40 $objWriter->writeAttribute('manifest:media-type', 'text/xml'); 41 $objWriter->endElement(); 42 $objWriter->startElement('manifest:file-entry'); 43 $objWriter->writeAttribute('manifest:full-path', 'settings.xml'); 44 $objWriter->writeAttribute('manifest:media-type', 'text/xml'); 45 $objWriter->endElement(); 46 $objWriter->startElement('manifest:file-entry'); 47 $objWriter->writeAttribute('manifest:full-path', 'content.xml'); 48 $objWriter->writeAttribute('manifest:media-type', 'text/xml'); 49 $objWriter->endElement(); 50 $objWriter->startElement('manifest:file-entry'); 51 $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png'); 52 $objWriter->writeAttribute('manifest:media-type', 'image/png'); 53 $objWriter->endElement(); 54 $objWriter->startElement('manifest:file-entry'); 55 $objWriter->writeAttribute('manifest:full-path', 'styles.xml'); 56 $objWriter->writeAttribute('manifest:media-type', 'text/xml'); 57 $objWriter->endElement(); 58 $objWriter->endElement(); 59 60 return $objWriter->getData(); 61 } 62 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body