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