text = $pText; } /** * Get text. * * @return string Text */ public function getText() { return $this->text; } /** * Set text. * * @param string $pText Text value * * @return \PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface */ public function setText($pText = '') { $this->text = $pText; return $this; } /** * Get font. */ public function getFont(): ?Font { return null; } public function hasHyperlink(): bool { return !\is_null($this->hyperlink); } public function getHyperlink(): Hyperlink { if (\is_null($this->hyperlink)) { $this->hyperlink = new Hyperlink(); } return $this->hyperlink; } /** * Set Hyperlink. * * @return \PhpOffice\PhpPresentation\Shape\RichText\TextElement */ public function setHyperlink(Hyperlink $pHyperlink = null) { $this->hyperlink = $pHyperlink; return $this; } /** * Get language. * * @return string */ public function getLanguage() { return $this->language; } /** * Set language. * * @param string $language * * @return TextElement */ public function setLanguage($language) { $this->language = $language; return $this; } /** * Get hash code. * * @return string Hash code */ public function getHashCode(): string { return \md5($this->text . (\is_null($this->hyperlink) ? '' : $this->hyperlink->getHashCode()) . __CLASS__); } }