ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Run.php
Go to the documentation of this file.
1 <?php
35 {
41  private $_font;
42 
48  public function __construct($pText = '')
49  {
50  // Initialise variables
51  $this->setText($pText);
52  $this->_font = new PHPExcel_Style_Font();
53  }
54 
60  public function getFont() {
61  return $this->_font;
62  }
63 
71  public function setFont(PHPExcel_Style_Font $pFont = null) {
72  $this->_font = $pFont;
73  return $this;
74  }
75 
81  public function getHashCode() {
82  return md5(
83  $this->getText()
84  . $this->_font->getHashCode()
85  . __CLASS__
86  );
87  }
88 
92  public function __clone() {
93  $vars = get_object_vars($this);
94  foreach ($vars as $key => $value) {
95  if (is_object($value)) {
96  $this->$key = clone $value;
97  } else {
98  $this->$key = $value;
99  }
100  }
101  }
102 }
setFont(PHPExcel_Style_Font $pFont=null)
Set font.
Definition: Run.php:71
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
Definition: Run.php:92
getHashCode()
Get hash code.
Definition: Run.php:81
__construct($pText='')
Create a new PHPExcel_RichText_Run instance.
Definition: Run.php:48
getFont()
Get font.
Definition: Run.php:60
setText($pText='')
Set text.