当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection方法代码示例

本文整理汇总了PHP中PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection方法的具体用法?PHP PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection怎么用?PHP PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPExcel_CachedObjectStorage_CacheBase的用法示例。


在下文中一共展示了PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: copyCellCollection

 public function copyCellCollection(PHPExcel_Worksheet $parent)
 {
     parent::copyCellCollection($parent);
     $newCollection = array();
     foreach ($this->_cellCache as $k => &$cell) {
         $newCollection[$k] = clone $cell;
         $newCollection[$k]->attach($parent);
     }
     $this->_cellCache = $newCollection;
 }
开发者ID:askzap,项目名称:ultimate,代码行数:10,代码来源:Memory.php

示例2: copyCellCollection

 /**
  * Clone the cell collection
  *
  * @param	PHPExcel_Worksheet	$parent		The new worksheet
  * @return	void
  */
 public function copyCellCollection(PHPExcel_Worksheet $parent)
 {
     parent::copyCellCollection($parent);
     //	Get a new id for the new file name
     $baseUnique = $this->_getUniqueID();
     $newCachePrefix = substr(md5($baseUnique), 0, 8) . '.';
     $cacheList = $this->getCellList();
     foreach ($cacheList as $cellID) {
         if ($cellID != $this->_currentObjectID) {
             $obj = $this->_memcache->get($this->_cachePrefix . $cellID . '.cache');
             if ($obj === false) {
                 //	Entry no longer exists in Memcache, so clear it from the cache array
                 parent::deleteCacheData($cellID);
                 throw new PHPExcel_Exception('Cell entry ' . $cellID . ' no longer exists in MemCache');
             }
             if (!$this->_memcache->add($newCachePrefix . $cellID . '.cache', $obj, NULL, $this->_cacheTime)) {
                 $this->__destruct();
                 throw new PHPExcel_Exception('Failed to store cell ' . $cellID . ' in MemCache');
             }
         }
     }
     $this->_cachePrefix = $newCachePrefix;
 }
开发者ID:arjunkumar786,项目名称:faces,代码行数:29,代码来源:Memcache.php

示例3: copyCellCollection

 /**
  *	Clone the cell collection
  *
  *	@return	void
  */
 public function copyCellCollection(PHPExcel_Worksheet $parent)
 {
     parent::copyCellCollection($parent);
     //	Get a new id for the new file name
     $baseUnique = $this->_getUniqueID();
     $newFileName = PHPExcel_Shared_File::sys_get_temp_dir() . '/PHPExcel.' . $baseUnique . '.cache';
     //	Copy the existing cell cache file
     copy($this->_fileName, $newFileName);
     $this->_fileName = $newFileName;
     //	Open the copied cell cache file
     $this->_fileHandle = fopen($this->_fileName, 'a+');
 }
开发者ID:TDMU,项目名称:contingent5_statserver,代码行数:17,代码来源:DiscISAM.php

示例4: copyCellCollection

 /**
  * Clone the cell collection
  *
  * @param    PHPExcel_Worksheet $parent The new worksheet
  *
  * @return    void
  */
 public function copyCellCollection(PHPExcel_Worksheet $parent)
 {
     parent::copyCellCollection($parent);
     //	Open a new stream for the cell cache data
     $newFileHandle = fopen('php://temp/maxmemory:' . $this->_memoryCacheSize, 'a+');
     //	Copy the existing cell cache data to the new stream
     fseek($this->_fileHandle, 0);
     while (!feof($this->_fileHandle)) {
         fwrite($newFileHandle, fread($this->_fileHandle, 1024));
     }
     $this->_fileHandle = $newFileHandle;
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:19,代码来源:PHPTemp.php


注:本文中的PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。