You are here

class PHPExcel_RichText_Run in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/Run.php \PHPExcel_RichText_Run

PHPExcel_RichText_Run

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

Hierarchy

Expanded class hierarchy of PHPExcel_RichText_Run

File

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

View source
class PHPExcel_RichText_Run extends PHPExcel_RichText_TextElement implements PHPExcel_RichText_ITextElement {

  /**
   * Font
   *
   * @var PHPExcel_Style_Font
   */
  private $_font;

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

    // Initialise variables
    $this
      ->setText($pText);
    $this->_font = new PHPExcel_Style_Font();
  }

  /**
   * Get font
   *
   * @return PHPExcel_Style_Font
   */
  public function getFont() {
    return $this->_font;
  }

  /**
   * Set font
   *
   * @param	PHPExcel_Style_Font		$pFont		Font
   * @throws 	PHPExcel_Exception
   * @return PHPExcel_RichText_ITextElement
   */
  public function setFont(PHPExcel_Style_Font $pFont = null) {
    $this->_font = $pFont;
    return $this;
  }

  /**
   * 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;
      }
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHPExcel_RichText_Run::$_font private property * Font * *
PHPExcel_RichText_Run::getFont public function * Get font * * Overrides PHPExcel_RichText_TextElement::getFont
PHPExcel_RichText_Run::getHashCode public function * Get hash code * * Overrides PHPExcel_RichText_TextElement::getHashCode
PHPExcel_RichText_Run::setFont public function * Set font * *
PHPExcel_RichText_Run::__clone public function * Implement PHP __clone to create a deep clone, not just a shallow copy. Overrides PHPExcel_RichText_TextElement::__clone
PHPExcel_RichText_Run::__construct public function Create a new PHPExcel_RichText_Run instance Overrides PHPExcel_RichText_TextElement::__construct
PHPExcel_RichText_TextElement::$_text private property * Text * *
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