123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
- {
-
- protected function storeData()
- {
- }
-
- public function addCacheData($pCoord, PHPExcel_Cell $cell)
- {
- $this->cellCache[$pCoord] = $cell;
-
- $this->currentObjectID = $pCoord;
- return $cell;
- }
-
- public function getCacheData($pCoord)
- {
-
- if (!isset($this->cellCache[$pCoord])) {
- $this->currentObjectID = null;
-
- return null;
- }
-
- $this->currentObjectID = $pCoord;
-
- return $this->cellCache[$pCoord];
- }
-
- public function copyCellCollection(PHPExcel_Worksheet $parent)
- {
- parent::copyCellCollection($parent);
- $newCollection = array();
- foreach ($this->cellCache as $k => &$cell) {
- $newCollection[$k] = clone $cell;
- $newCollection[$k]->attach($this);
- }
- $this->cellCache = $newCollection;
- }
-
- public function unsetWorksheetCells()
- {
-
- foreach ($this->cellCache as $k => &$cell) {
- $cell->detach();
- $this->cellCache[$k] = null;
- }
- unset($cell);
- $this->cellCache = array();
-
- $this->parent = null;
- }
- }
|