target = $target; $this->text = is_null($text) ? $target : $text; $this->fontStyle = $this->setStyle(new Font('text'), $fontStyle); $this->paragraphStyle = $this->setStyle(new Paragraph(), $paragraphStyle); return $this; } /** * Get link target * * @return string */ public function getTarget() { return $this->target; } /** * Get link text * * @return string */ public function getText() { return $this->text; } /** * Get Text style * * @return string|\PhpOffice\PhpWord\Style\Font */ public function getFontStyle() { return $this->fontStyle; } /** * Get Paragraph style * * @return string|\PhpOffice\PhpWord\Style\Paragraph */ public function getParagraphStyle() { return $this->paragraphStyle; } /** * Get Link source * * @return string * @deprecated 0.10.0 * @codeCoverageIgnore */ public function getLinkSrc() { return $this->getTarget(); } /** * Get Link name * * @return string * @deprecated 0.10.0 * @codeCoverageIgnore */ public function getLinkName() { return $this->getText(); } }