parentWriter = $pWriter; } /** * Get parent IWriter object. * * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception * * @return \PhpOffice\PhpSpreadsheet\Writer\IWriter */ public function getParentWriter() { if (!is_null($this->parentWriter)) { return $this->parentWriter; } throw new \PhpOffice\PhpSpreadsheet\Writer\Exception('No parent \\PhpOffice\\PhpSpreadsheet\\Writer\\IWriter assigned.'); } /** * Set parent IWriter object. * * @param \PhpOffice\PhpSpreadsheet\Writer\IWriter $pWriter * * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ public function __construct(\PhpOffice\PhpSpreadsheet\Writer\IWriter $pWriter = null) { if (!is_null($pWriter)) { $this->parentWriter = $pWriter; } } }