setText($pText); $this->_font = new PHPPowerPoint_Style_Font(); } /** * Get font * * @return PHPPowerPoint_Style_Font */ public function getFont() { return $this->_font; } /** * Set font * * @param PHPPowerPoint_Style_Font $pFont Font * @throws Exception */ public function setFont(PHPPowerPoint_Style_Font $pFont = null) { $this->_font = $pFont; } /** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5( $this->getText() . $this->_font->getHashCode() . __CLASS__ ); } /** * Implement PHP __clone to create a deep clone, not just a shallow copy. */ public function __clone() { $vars = get_object_vars($this); foreach ($vars as $key => $value) { if (is_object($value)) { $this->$key = clone $value; } else { $this->$key = $value; } } } }