You are here

class PHPExcel_RichText_TextElement in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/TextElement.php \PHPExcel_RichText_TextElement

PHPExcel_RichText_TextElement

@category PHPExcel @package PHPExcel_RichText @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

Hierarchy

Expanded class hierarchy of PHPExcel_RichText_TextElement

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/TextElement.php, line 34

View source
class PHPExcel_RichText_TextElement implements PHPExcel_RichText_ITextElement {

  /**
   * Text
   *
   * @var string
   */
  private $_text;

  /**
   * Create a new PHPExcel_RichText_TextElement instance
   *
   * @param 	string		$pText		Text
   */
  public function __construct($pText = '') {

    // Initialise variables
    $this->_text = $pText;
  }

  /**
   * Get text
   *
   * @return string	Text
   */
  public function getText() {
    return $this->_text;
  }

  /**
   * Set text
   *
   * @param 	$pText string	Text
   * @return PHPExcel_RichText_ITextElement
   */
  public function setText($pText = '') {
    $this->_text = $pText;
    return $this;
  }

  /**
   * Get font
   *
   * @return PHPExcel_Style_Font
   */
  public function getFont() {
    return null;
  }

  /**
   * Get hash code
   *
   * @return string	Hash code
   */
  public function getHashCode() {
    return md5($this->_text . __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;
      }
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHPExcel_RichText_TextElement::$_text private property * Text * *
PHPExcel_RichText_TextElement::getFont public function * Get font * * Overrides PHPExcel_RichText_ITextElement::getFont 1
PHPExcel_RichText_TextElement::getHashCode public function * Get hash code * * Overrides PHPExcel_RichText_ITextElement::getHashCode 1
PHPExcel_RichText_TextElement::getText public function * Get text * * Overrides PHPExcel_RichText_ITextElement::getText
PHPExcel_RichText_TextElement::setText public function * Set text * * Overrides PHPExcel_RichText_ITextElement::setText
PHPExcel_RichText_TextElement::__clone public function * Implement PHP __clone to create a deep clone, not just a shallow copy. 1
PHPExcel_RichText_TextElement::__construct public function Create a new PHPExcel_RichText_TextElement instance 1