source = SharedText::toUTF8($source); $this->text = is_null($text) ? $this->source : SharedText::toUTF8($text); $this->fontStyle = $this->setNewStyle(new Font('text'), $fontStyle); $this->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle); $this->internal = $internal; } /** * Get link source * * @return string */ public function getSource() { return $this->source; } /** * 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 target * * @deprecated 0.12.0 * * @return string * * @codeCoverageIgnore */ public function getTarget() { return $this->source; } /** * Get Link source * * @deprecated 0.10.0 * * @return string * * @codeCoverageIgnore */ public function getLinkSrc() { return $this->getSource(); } /** * Get Link name * * @deprecated 0.10.0 * * @return string * * @codeCoverageIgnore */ public function getLinkName() { return $this->getText(); } /** * is internal * * @return bool */ public function isInternal() { return $this->internal; } }