ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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. More...
 
 getCacheData ($pCoord)
 Get cell at a specific coordinate. More...
 
 copyCellCollection (PHPExcel_Worksheet $parent)
 Clone the cell collection. More...
 
 unsetWorksheetCells ()
 Clear the cell collection and disconnect from our parent. More...
 
- Public Member Functions inherited from PHPExcel_CachedObjectStorage_CacheBase
 __construct (PHPExcel_Worksheet $parent)
 Initialise this new cell collection. More...
 
 getParent ()
 Return the parent worksheet for this cell collection. More...
 
 isDataSet ($pCoord)
 Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? More...
 
 moveCell ($fromAddress, $toAddress)
 Move a cell object from one address to another. More...
 
 updateCacheData (PHPExcel_Cell $cell)
 Add or Update a cell in cache. More...
 
 deleteCacheData ($pCoord)
 Delete a cell in cache identified by coordinate address. More...
 
 getCellList ()
 Get a list of all cell addresses currently held in cache. More...
 
 getSortedCellList ()
 Sort the list of all cell addresses currently held in cache by row and column. More...
 
 getHighestRowAndColumn ()
 Get highest worksheet column and highest row that have cell records. More...
 
 getCurrentAddress ()
 Return the cell address of the currently active cell object. More...
 
 getCurrentColumn ()
 Return the column address of the currently active cell object. More...
 
 getCurrentRow ()
 Return the row address of the currently active cell object. More...
 
 getHighestColumn ($row=null)
 Get highest worksheet column. More...
 
 getHighestRow ($column=null)
 Get highest worksheet row. More...
 
 copyCellCollection (PHPExcel_Worksheet $parent)
 Clone the cell collection. More...
 
 removeRow ($row)
 Remove a row, deleting all cells in that row. More...
 
 removeColumn ($column)
 Remove a column, deleting all cells in that column. More...
 
- Public Member Functions inherited from PHPExcel_CachedObjectStorage_ICache
 updateCacheData (PHPExcel_Cell $cell)
 Add or Update a cell in cache. More...
 
 deleteCacheData ($pCoord)
 Delete a cell in cache identified by coordinate address. More...
 
 isDataSet ($pCoord)
 Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? More...
 
 getCellList ()
 Get a list of all cell addresses currently held in cache. More...
 
 getSortedCellList ()
 Get the list of all cell addresses currently held in cache sorted by column and row. More...
 

Protected Member Functions

 _storeData ()
 Dummy method callable from CacheBase, but unused by Memory cache. More...
 
- Protected Member Functions inherited from PHPExcel_CachedObjectStorage_CacheBase
 _getUniqueID ()
 Generate a unique ID for cache referencing. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from PHPExcel_CachedObjectStorage_CacheBase
static cacheMethodIsAvailable ()
 Identify whether the caching method is currently available Some methods are dependent on the availability of certain extensions being enabled in the PHP build. More...
 
- Static Public Member Functions inherited from PHPExcel_CachedObjectStorage_ICache
static cacheMethodIsAvailable ()
 Identify whether the caching method is currently available Some methods are dependent on the availability of certain extensions being enabled in the PHP build. More...
 
- Protected Attributes inherited from PHPExcel_CachedObjectStorage_CacheBase
 $_parent
 
 $_currentObject = null
 
 $_currentObjectID = null
 
 $_currentCellIsDirty = true
 
 $_cellCache = array()
 

Detailed Description

Definition at line 36 of file Memory.php.

Member Function Documentation

◆ _storeData()

PHPExcel_CachedObjectStorage_Memory::_storeData ( )
protected

Dummy method callable from CacheBase, but unused by Memory cache.

Returns
void

Definition at line 43 of file Memory.php.

43  {
44  } // function _storeData()

◆ addCacheData()

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
PHPExcel_Cell
Exceptions
PHPExcel_Exception

Implements PHPExcel_CachedObjectStorage_ICache.

Definition at line 54 of file Memory.php.

54  {
55  $this->_cellCache[$pCoord] = $cell;
56 
57  // Set current entry to the new/updated entry
58  $this->_currentObjectID = $pCoord;
59 
60  return $cell;
61  } // function addCacheData()

◆ copyCellCollection()

PHPExcel_CachedObjectStorage_Memory::copyCellCollection ( PHPExcel_Worksheet  $parent)

Clone the cell collection.

Parameters
PHPExcel_Worksheet$parentThe new worksheet
Returns
void

Implements PHPExcel_CachedObjectStorage_ICache.

Definition at line 93 of file Memory.php.

References array.

93  {
94  parent::copyCellCollection($parent);
95 
96  $newCollection = array();
97  foreach($this->_cellCache as $k => &$cell) {
98  $newCollection[$k] = clone $cell;
99  $newCollection[$k]->attach($this);
100  }
101 
102  $this->_cellCache = $newCollection;
103  }
Create styles array
The data for the language used.

◆ getCacheData()

PHPExcel_CachedObjectStorage_Memory::getCacheData (   $pCoord)

Get cell at a specific coordinate.

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

Implements PHPExcel_CachedObjectStorage_ICache.

Definition at line 71 of file Memory.php.

71  {
72  // Check if the entry that has been requested actually exists
73  if (!isset($this->_cellCache[$pCoord])) {
74  $this->_currentObjectID = NULL;
75  // Return null if requested entry doesn't exist in cache
76  return null;
77  }
78 
79  // Set current entry to the requested entry
80  $this->_currentObjectID = $pCoord;
81 
82  // Return requested entry
83  return $this->_cellCache[$pCoord];
84  } // function getCacheData()

◆ unsetWorksheetCells()

PHPExcel_CachedObjectStorage_Memory::unsetWorksheetCells ( )

Clear the cell collection and disconnect from our parent.

Returns
void

Definition at line 111 of file Memory.php.

References array.

111  {
112  // Because cells are all stored as intact objects in memory, we need to detach each one from the parent
113  foreach($this->_cellCache as $k => &$cell) {
114  $cell->detach();
115  $this->_cellCache[$k] = null;
116  }
117  unset($cell);
118 
119  $this->_cellCache = array();
120 
121  // detach ourself from the worksheet, so that it can then delete this object successfully
122  $this->_parent = null;
123  } // function unsetWorksheetCells()
Create styles array
The data for the language used.

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