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

Public Member Functions

 __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.
 copyCellCollection (PHPExcel_Worksheet $parent)
 Clone the cell collection.

Protected Member Functions

 _getUniqueID ()

Protected Attributes

 $_parent
 $_currentObject = null
 $_currentObjectID = null
 $_cellCache = array()

Detailed Description

Definition at line 36 of file CacheBase.php.

Constructor & Destructor Documentation

PHPExcel_CachedObjectStorage_CacheBase::__construct ( PHPExcel_Worksheet  $parent)

Reimplemented in PHPExcel_CachedObjectStorage_DiscISAM.

Definition at line 69 of file CacheBase.php.

{
// Set our parent worksheet.
// This is maintained within the cache controller to facilitate re-attaching it to PHPExcel_Cell objects when
// they are woken from a serialized state
$this->_parent = $parent;
} // function __construct()

Member Function Documentation

PHPExcel_CachedObjectStorage_CacheBase::_getUniqueID ( )
protected
PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection ( PHPExcel_Worksheet  $parent)

Clone the cell collection.

Returns
void

Reimplemented in PHPExcel_CachedObjectStorage_Wincache, PHPExcel_CachedObjectStorage_Memcache, PHPExcel_CachedObjectStorage_APC, PHPExcel_CachedObjectStorage_PHPTemp, PHPExcel_CachedObjectStorage_DiscISAM, and PHPExcel_CachedObjectStorage_Memory.

Definition at line 165 of file CacheBase.php.

{
$this->_parent = $parent;
if ((!is_null($this->_currentObject)) && (is_object($this->_currentObject))) {
$this->_currentObject->attach($parent);
}
} // function copyCellCollection()
PHPExcel_CachedObjectStorage_CacheBase::deleteCacheData (   $pCoord)

Delete a cell in cache identified by coordinate address.

Parameters
string$pCoordCoordinate address of the cell to delete
Exceptions
Exception

Reimplemented in PHPExcel_CachedObjectStorage_Wincache, PHPExcel_CachedObjectStorage_Memcache, and PHPExcel_CachedObjectStorage_APC.

Definition at line 111 of file CacheBase.php.

{
if ($pCoord === $this->_currentObjectID) {
$this->_currentObject->detach();
$this->_currentObjectID = $this->_currentObject = null;
}
if (is_object($this->_cellCache[$pCoord])) {
$this->_cellCache[$pCoord]->detach();
unset($this->_cellCache[$pCoord]);
}
} // function deleteCacheData()
PHPExcel_CachedObjectStorage_CacheBase::getCellList ( )

Get a list of all cell addresses currently held in cache.

Returns
array of string

Definition at line 129 of file CacheBase.php.

Referenced by PHPExcel_CachedObjectStorage_APC\__destruct(), PHPExcel_CachedObjectStorage_Wincache\__destruct(), PHPExcel_CachedObjectStorage_Memcache\__destruct(), PHPExcel_CachedObjectStorage_APC\copyCellCollection(), PHPExcel_CachedObjectStorage_Memcache\copyCellCollection(), and PHPExcel_CachedObjectStorage_Wincache\copyCellCollection().

{
return array_keys($this->_cellCache);
} // function getCellList()

+ Here is the caller graph for this function:

PHPExcel_CachedObjectStorage_CacheBase::getSortedCellList ( )

Sort the list of all cell addresses currently held in cache by row and column.

Returns
void

Definition at line 139 of file CacheBase.php.

References $row.

{
$sortKeys = array();
foreach (array_keys($this->_cellCache) as $coord) {
list($column,$row) = sscanf($coord,'%[A-Z]%d');
$sortKeys[sprintf('%09d%3s',$row,$column)] = $coord;
}
ksort($sortKeys);
return array_values($sortKeys);
} // function sortCellList()
PHPExcel_CachedObjectStorage_CacheBase::isDataSet (   $pCoord)

Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?

Parameters
string$pCoordCoordinate address of the cell to check
Returns
void
boolean

Reimplemented in PHPExcel_CachedObjectStorage_Wincache, PHPExcel_CachedObjectStorage_Memcache, and PHPExcel_CachedObjectStorage_APC.

Definition at line 84 of file CacheBase.php.

{
if ($pCoord === $this->_currentObjectID) {
return true;
}
// Check if the requested entry exists in the cache
return isset($this->_cellCache[$pCoord]);
} // function isDataSet()
PHPExcel_CachedObjectStorage_CacheBase::updateCacheData ( PHPExcel_Cell  $cell)

Add or Update a cell in cache.

Parameters
PHPExcel_Cell$cellCell to update
Returns
void
Exceptions
Exception

Definition at line 100 of file CacheBase.php.

References PHPExcel_Cell\getCoordinate().

{
return $this->addCacheData($cell->getCoordinate(),$cell);
} // function updateCacheData()

+ Here is the call graph for this function:

Field Documentation

PHPExcel_CachedObjectStorage_CacheBase::$_cellCache = array()
protected

Definition at line 66 of file CacheBase.php.

PHPExcel_CachedObjectStorage_CacheBase::$_parent
protected

Definition at line 43 of file CacheBase.php.


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