parentWriter->getPhpWord(); if (is_null($phpWord)) { throw new Exception('No PhpWord assigned.'); } $xmlWriter = $this->getXmlWriter(); $xmlWriter->startDocument('1.0', 'UTF-8', 'yes'); $xmlWriter->startElement('Properties'); $xmlWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'); $xmlWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); $xmlWriter->writeElement('Application', 'PHPWord'); $xmlWriter->writeElement('Company', $phpWord->getDocumentProperties()->getCompany()); $xmlWriter->writeElement('Manager', $phpWord->getDocumentProperties()->getManager()); $xmlWriter->endElement(); // Properties return $xmlWriter->getData(); } }