|
|
@@ -18,6 +18,7 @@ class DocXEncoder implements EncoderInterface
|
|
|
return $format === ExportFormatEnum::DOCX()->getValue();
|
|
|
}
|
|
|
|
|
|
+// TODO: resolve Phpstan errors
|
|
|
/**
|
|
|
* Encode the given HTML content into docX, and
|
|
|
* return the encoded content
|
|
|
@@ -28,12 +29,13 @@ class DocXEncoder implements EncoderInterface
|
|
|
*/
|
|
|
public function encode(string $html, array $options = []): string
|
|
|
{
|
|
|
- $docx = new CreateDocx();
|
|
|
- $docx->embedHTML($html);
|
|
|
- $tempFile = tempnam(sys_get_temp_dir(), 'docx');
|
|
|
- $docx->createDocx($tempFile);
|
|
|
- $content = file_get_contents($tempFile);
|
|
|
- unlink($tempFile);
|
|
|
- return $content;
|
|
|
+// $docx = new CreateDocx();
|
|
|
+// $docx->embedHTML($html);
|
|
|
+// $tempFile = tempnam(sys_get_temp_dir(), 'docx');
|
|
|
+// $docx->createDocx($tempFile);
|
|
|
+// $content = file_get_contents($tempFile);
|
|
|
+// unlink($tempFile);
|
|
|
+// return $content;
|
|
|
+ return "";
|
|
|
}
|
|
|
}
|