ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_CachedObjectStorage_Memory Class Reference
+ Inheritance diagram for PHPExcel_CachedObjectStorage_Memory:
+ Collaboration diagram for PHPExcel_CachedObjectStorage_Memory:

Public Member Functions

 addCacheData ($pCoord, PHPExcel_Cell $cell)
 Add or Update a cell in cache identified by coordinate address.
 getCacheData ($pCoord)
 Get cell at a specific coordinate.
 copyCellCollection (PHPExcel_Worksheet $parent)
 Clone the cell collection.
 unsetWorksheetCells ()
- Public Member Functions inherited from PHPExcel_CachedObjectStorage_CacheBase
 __construct (PHPExcel_Worksheet $parent)
 isDataSet ($pCoord)
 Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
 updateCacheData (PHPExcel_Cell $cell)
 Add or Update a cell in cache.
 deleteCacheData ($pCoord)
 Delete a cell in cache identified by coordinate address.
 getCellList ()
 Get a list of all cell addresses currently held in cache.
 getSortedCellList ()
 Sort the list of all cell addresses currently held in cache by row and column.
- Public Member Functions inherited from PHPExcel_CachedObjectStorage_ICache
 updateCacheData (PHPExcel_Cell $cell)
 Add or Update a cell in cache.
 deleteCacheData ($pCoord)
 Delete a cell in cache identified by coordinate address.
 isDataSet ($pCoord)
 Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
 getCellList ()
 Get a list of all cell addresses currently held in cache.
 getSortedCellList ()
 Get the list of all cell addresses currently held in cache sorted by column and row.

Additional Inherited Members

- Protected Member Functions inherited from PHPExcel_CachedObjectStorage_CacheBase
 _getUniqueID ()
- Protected Attributes inherited from PHPExcel_CachedObjectStorage_CacheBase
 $_parent
 $_currentObject = null
 $_currentObjectID = null
 $_cellCache = array()

Detailed Description

Definition at line 36 of file Memory.php.

Member Function Documentation

PHPExcel_CachedObjectStorage_Memory::addCacheData (   $pCoord,
PHPExcel_Cell  $cell 
)

Add or Update a cell in cache identified by coordinate address.

Parameters
string$pCoordCoordinate address of the cell to update
PHPExcel_Cell$cellCell to update
Returns
void
Exceptions
Exception

Implements PHPExcel_CachedObjectStorage_ICache.

Definition at line 46 of file Memory.php.

{
$this->_cellCache[$pCoord] = $cell;
return $cell;
} // function addCacheData()
PHPExcel_CachedObjectStorage_Memory::copyCellCollection ( PHPExcel_Worksheet  $parent)

Clone the cell collection.

Returns
void

Reimplemented from PHPExcel_CachedObjectStorage_CacheBase.

Definition at line 71 of file Memory.php.

{
$newCollection = array();
foreach($this->_cellCache as $k => &$cell) {
$newCollection[$k] = clone $cell;
$newCollection[$k]->attach($parent);
}
$this->_cellCache = $newCollection;
}
PHPExcel_CachedObjectStorage_Memory::getCacheData (   $pCoord)

Get cell at a specific coordinate.

Parameters
string$pCoordCoordinate of the cell
Exceptions
Exception
Returns
PHPExcel_Cell Cell that was found, or null if not found

Implements PHPExcel_CachedObjectStorage_ICache.

Definition at line 59 of file Memory.php.

{
// Check if the entry that has been requested actually exists
if (!isset($this->_cellCache[$pCoord])) {
// Return null if requested entry doesn't exist in cache
return null;
}
// Return requested entry
return $this->_cellCache[$pCoord];
} // function getCacheData()
PHPExcel_CachedObjectStorage_Memory::unsetWorksheetCells ( )

Definition at line 84 of file Memory.php.

{
// 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;
} // function unsetWorksheetCells()

The documentation for this class was generated from the following file: