parentWriter = $writer; } /** * Get parent writer * * @return \PhpOffice\PhpWord\Writer\AbstractWriter * @throws \PhpOffice\PhpWord\Exception\Exception */ public function getParentWriter() { if ($this->parentWriter !== null) { return $this->parentWriter; } else { throw new Exception('No parent WriterInterface assigned.'); } } }