escaper = new Escaper(); } /** * @return string */ abstract public function write(); /** * @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer * * @return void */ public function setParentWriter(AbstractWriter $writer = null) { $this->parentWriter = $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.'); } } }