text = $pText; } /** * Get text * * @return string Text */ public function getText() { return $this->text; } /** * Set text * * @param $pText string Text * @return \PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface */ public function setText($pText = '') { $this->text = $pText; return $this; } /** * Get font * * @return \PhpOffice\PhpPresentation\Style\Font */ public function getFont() { return null; } /** * Has Hyperlink? * * @return boolean */ public function hasHyperlink() { return !is_null($this->hyperlink); } /** * Get Hyperlink * * @return \PhpOffice\PhpPresentation\Shape\Hyperlink * @throws \Exception */ public function getHyperlink() { if (is_null($this->hyperlink)) { $this->hyperlink = new Hyperlink(); } return $this->hyperlink; } /** * Set Hyperlink * * @param \PhpOffice\PhpPresentation\Shape\Hyperlink $pHyperlink * @throws \Exception * @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() { return md5($this->text . (is_null($this->hyperlink) ? '' : $this->hyperlink->getHashCode()) . __CLASS__); } }