filename = $filename; $this->documentDraft = $draft; $this->documentHandle = new \PhpOffice\PhpWord\TemplateProcessor('drafts/' . $this->documentDraft); } public function getFilename() { return $this->filename; } public function saveFile() { $this->documentHandle->saveAs('documents/' . $this->filename); } public function getVariables() { return $this->documentHandle->getVariables(); } public function setVal($key, $val) { $this->documentHandle->setValue($key, $val); } } ?>