source = $source; $this->style = $this->setNewStyle(new ImageStyle(), $style, true); $this->icon = realpath(__DIR__ . "/../resources/{$ext}.png"); return; } throw new InvalidObjectException(); } /** * Get object source. * * @return string */ public function getSource() { return $this->source; } /** * Get object style. * * @return ?\PhpOffice\PhpWord\Style\Image */ public function getStyle() { return $this->style; } /** * Get object icon. * * @return string */ public function getIcon() { return $this->icon; } /** * Get image relation ID. * * @return int */ public function getImageRelationId() { return $this->imageRelationId; } /** * Set Image Relation ID. * * @param int $rId */ public function setImageRelationId($rId): void { $this->imageRelationId = $rId; } }