You are here

public function PHPExcel_CachedObjectStorage_DiscISAM::copyCellCollection in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php \PHPExcel_CachedObjectStorage_DiscISAM::copyCellCollection()

* Clone the cell collection * *

Parameters

PHPExcel_Worksheet $parent The new worksheet: * @return void

Overrides PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php, line 155

Class

PHPExcel_CachedObjectStorage_DiscISAM
PHPExcel_CachedObjectStorage_DiscISAM

Code

public function copyCellCollection(PHPExcel_Worksheet $parent) {
  parent::copyCellCollection($parent);

  //	Get a new id for the new file name
  $baseUnique = $this
    ->_getUniqueID();
  $newFileName = $this->_cacheDirectory . '/PHPExcel.' . $baseUnique . '.cache';

  //	Copy the existing cell cache file
  copy($this->_fileName, $newFileName);
  $this->_fileName = $newFileName;

  //	Open the copied cell cache file
  $this->_fileHandle = fopen($this->_fileName, 'a+');
}