You are here

public function PHPExcel_CachedObjectStorage_Memory::unsetWorksheetCells in Loft Data Grids 7.2

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

* Clear the cell collection and disconnect from our parent * *

Return value

void

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memory.php, line 111

Class

PHPExcel_CachedObjectStorage_Memory
PHPExcel_CachedObjectStorage_Memory

Code

public function unsetWorksheetCells() {

  //	Because cells are all stored as intact objects in memory, we need to detach each one from the parent
  foreach ($this->_cellCache as $k => &$cell) {
    $cell
      ->detach();
    $this->_cellCache[$k] = null;
  }
  unset($cell);
  $this->_cellCache = array();

  //	detach ourself from the worksheet, so that it can then delete this object successfully
  $this->_parent = null;
}