ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\RichText\TextElement Class Reference
+ Inheritance diagram for PhpOffice\PhpSpreadsheet\RichText\TextElement:
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\RichText\TextElement:

Public Member Functions

 __construct ($pText='')
 Create a new TextElement instance. More...
 
 getText ()
 Get text. More...
 
 setText ($text)
 Set text. More...
 
 getFont ()
 Get font. More...
 
 getHashCode ()
 Get hash code. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 

Private Attributes

 $text
 

Detailed Description

Definition at line 5 of file TextElement.php.

Constructor & Destructor Documentation

◆ __construct()

PhpOffice\PhpSpreadsheet\RichText\TextElement::__construct (   $pText = '')

Create a new TextElement instance.

Parameters
string$pTextText

Definition at line 19 of file TextElement.php.

20  {
21  // Initialise variables
22  $this->text = $pText;
23  }

Member Function Documentation

◆ __clone()

PhpOffice\PhpSpreadsheet\RichText\TextElement::__clone ( )

Implement PHP __clone to create a deep clone, not just a shallow copy.

Definition at line 75 of file TextElement.php.

References $key.

76  {
77  $vars = get_object_vars($this);
78  foreach ($vars as $key => $value) {
79  if (is_object($value)) {
80  $this->$key = clone $value;
81  } else {
82  $this->$key = $value;
83  }
84  }
85  }
$key
Definition: croninfo.php:18

◆ getFont()

PhpOffice\PhpSpreadsheet\RichText\TextElement::getFont ( )

Get font.

Returns
null|

Implements PhpOffice\PhpSpreadsheet\RichText\ITextElement.

Definition at line 54 of file TextElement.php.

55  {
56  return null;
57  }

◆ getHashCode()

PhpOffice\PhpSpreadsheet\RichText\TextElement::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PhpOffice\PhpSpreadsheet\RichText\ITextElement.

Definition at line 64 of file TextElement.php.

65  {
66  return md5(
67  $this->text .
68  __CLASS__
69  );
70  }

◆ getText()

PhpOffice\PhpSpreadsheet\RichText\TextElement::getText ( )

Get text.

Returns
string Text

Implements PhpOffice\PhpSpreadsheet\RichText\ITextElement.

Definition at line 30 of file TextElement.php.

References PhpOffice\PhpSpreadsheet\RichText\TextElement\$text.

◆ setText()

PhpOffice\PhpSpreadsheet\RichText\TextElement::setText (   $text)

Set text.

Parameters
string$textText
Returns
$this

Implements PhpOffice\PhpSpreadsheet\RichText\ITextElement.

Definition at line 42 of file TextElement.php.

References PhpOffice\PhpSpreadsheet\RichText\TextElement\$text.

43  {
44  $this->text = $text;
45 
46  return $this;
47  }

Field Documentation

◆ $text

PhpOffice\PhpSpreadsheet\RichText\TextElement::$text
private

The documentation for this class was generated from the following file: