You are here

public function PHPExcel_RichText_TextElement::__clone 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::__clone()

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

1 method overrides PHPExcel_RichText_TextElement::__clone()
PHPExcel_RichText_Run::__clone in vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/Run.php
* Implement PHP __clone to create a deep clone, not just a shallow copy.

File

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

Class

PHPExcel_RichText_TextElement
PHPExcel_RichText_TextElement

Code

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