You are here

public function PHPExcel_CachedObjectStorage_APC::isDataSet in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/APC.php \PHPExcel_CachedObjectStorage_APC::isDataSet()

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

@access public

Parameters

string $pCoord Coordinate address of the cell to check:

Return value

boolean

Throws

PHPExcel_Exception

Overrides PHPExcel_CachedObjectStorage_CacheBase::isDataSet

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/APC.php, line 108

Class

PHPExcel_CachedObjectStorage_APC
PHPExcel_CachedObjectStorage_APC

Code

public function isDataSet($pCoord) {

  //    Check if the requested entry is the current object, or exists in the cache
  if (parent::isDataSet($pCoord)) {
    if ($this->_currentObjectID == $pCoord) {
      return true;
    }

    //    Check if the requested entry still exists in apc
    $success = apc_fetch($this->_cachePrefix . $pCoord . '.cache');
    if ($success === FALSE) {

      //    Entry no longer exists in APC, so clear it from the cache array
      parent::deleteCacheData($pCoord);
      throw new PHPExcel_Exception('Cell entry ' . $pCoord . ' no longer exists in APC cache');
    }
    return true;
  }
  return false;
}