Load template, update its contents AND meta, then save

Nov 30, 2014 at 2:13 AM
Edited Nov 30, 2014 at 2:13 AM
Hi all,

I am using PHPWord to do following:
  1. Load a "template", with "${field}" to be replaced in my PHP with inputs from an HTML form. Done by $doc=$wa->load(...);
  2. I tried to modify the document's meta data with some dynamic contents too.
It seems that a PhpOffice\PhpWord\Template $doc object does not have a getProperties method as there is in a PhpOffice\PhpWord\Phpword $wa object; while a $wa object does not have setValue method as in $doc.

The saving of the modifiled template is via $doc->save but it does not encapsulate what I did in $wa.

Any hints?