Fix failed test
This commit is contained in:
parent
dd9faaee06
commit
6aa73544a6
|
|
@ -170,6 +170,8 @@ class ZipArchive
|
|||
$list = $this->zip->listContent();
|
||||
$listCount = count($list);
|
||||
$listIndex = -1;
|
||||
$contents = null;
|
||||
|
||||
for ($i = 0; $i < $listCount; ++$i) {
|
||||
if (strtolower($list[$i]["filename"]) == strtolower($fileName) ||
|
||||
strtolower($list[$i]["stored_filename"]) == strtolower($fileName)) {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ class Content extends WriterPart
|
|||
*/
|
||||
public function writeContent(PhpWord $phpWord = null)
|
||||
{
|
||||
if (is_null($phpWord)) {
|
||||
throw new Exception("No PhpWord assigned.");
|
||||
}
|
||||
|
||||
// Create XML writer
|
||||
$xmlWriter = $this->getXmlWriter();
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ class Meta extends WriterPart
|
|||
*/
|
||||
public function writeMeta(PhpWord $phpWord = null)
|
||||
{
|
||||
if (is_null($phpWord)) {
|
||||
throw new Exception("No PhpWord assigned.");
|
||||
}
|
||||
|
||||
// Create XML writer
|
||||
$xmlWriter = $this->getXmlWriter();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ class Styles extends WriterPart
|
|||
*/
|
||||
public function writeStyles(PhpWord $phpWord = null)
|
||||
{
|
||||
if (is_null($phpWord)) {
|
||||
throw new Exception("No PhpWord assigned.");
|
||||
}
|
||||
|
||||
// Create XML writer
|
||||
$xmlWriter = $this->getXmlWriter();
|
||||
|
||||
|
|
|
|||
|
|
@ -66,12 +66,10 @@ class ContentTypes extends WriterPart
|
|||
$xmlWriter->startDocument('1.0', 'UTF-8', 'yes');
|
||||
$xmlWriter->startElement('Types');
|
||||
$xmlWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/content-types');
|
||||
foreach ($defaults as $key => $value)
|
||||
{
|
||||
foreach ($defaults as $key => $value) {
|
||||
$this->writeContentType($xmlWriter, true, $key, $value);
|
||||
}
|
||||
foreach ($overrides as $key => $value)
|
||||
{
|
||||
foreach ($overrides as $key => $value) {
|
||||
$this->writeContentType($xmlWriter, false, $key, $value);
|
||||
}
|
||||
$xmlWriter->endElement();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ class DocProps extends WriterPart
|
|||
*/
|
||||
public function writeDocPropsApp(PhpWord $phpWord = null)
|
||||
{
|
||||
if (is_null($phpWord)) {
|
||||
throw new Exception("No PhpWord assigned.");
|
||||
}
|
||||
|
||||
// Create XML writer
|
||||
$xmlWriter = $this->getXmlWriter();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ class Document extends Base
|
|||
*/
|
||||
public function writeDocument(PhpWord $phpWord = null)
|
||||
{
|
||||
if (is_null($phpWord)) {
|
||||
throw new Exception("No PhpWord assigned.");
|
||||
}
|
||||
|
||||
// Create XML writer
|
||||
$xmlWriter = $this->getXmlWriter();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue