source = SharedText::toUTF8($source); $this->text = 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 null|\PhpOffice\PhpWord\Style\Font|string */ public function getFontStyle() { return $this->fontStyle; } /** * Get Paragraph style. * * @return null|\PhpOffice\PhpWord\Style\Paragraph|string */ public function getParagraphStyle() { return $this->paragraphStyle; } /** * is internal. * * @return bool */ public function isInternal() { return $this->internal; } }