You are here

public function PHPExcel::__clone in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel.php \PHPExcel::__clone()

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

File

vendor/phpoffice/phpexcel/Classes/PHPExcel.php, line 863

Class

PHPExcel
PHPExcel

Code

public function __clone() {
  foreach ($this as $key => $val) {
    if (is_object($val) || is_array($val)) {
      $this->{$key} = unserialize(serialize($val));
    }
  }
}