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


PHP PHPExcel_CachedObjectStorage_CacheBase类代码示例

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


在下文中一共展示了PHPExcel_CachedObjectStorage_CacheBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: __construct

 /**
  * Initialise this new cell collection
  *
  * @param    PHPExcel_Worksheet $parent The worksheet for this cell collection
  */
 public function __construct(PHPExcel_Worksheet $parent)
 {
     parent::__construct($parent);
     if (is_null($this->_DBHandle)) {
         $this->_TableName = str_replace('.', '_', $this->_getUniqueID());
         $_DBName = ':memory:';
         $this->_DBHandle = new SQLiteDatabase($_DBName);
         if ($this->_DBHandle === false) {
             throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError()));
         }
         if (!$this->_DBHandle->queryExec('CREATE TABLE kvp_' . $this->_TableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) {
             throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError()));
         }
     }
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:20,代码来源:SQLite.php

示例3: __construct

 /**
  * Initialise this new cell collection
  *
  * @param    PHPExcel_Worksheet $parent The worksheet for this cell collection
  */
 public function __construct(PHPExcel_Worksheet $parent)
 {
     parent::__construct($parent);
     if (is_null($this->_DBHandle)) {
         $this->_TableName = str_replace('.', '_', $this->_getUniqueID());
         $_DBName = ':memory:';
         $this->_DBHandle = new SQLite3($_DBName);
         if ($this->_DBHandle === false) {
             throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg());
         }
         if (!$this->_DBHandle->exec('CREATE TABLE kvp_' . $this->_TableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) {
             throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg());
         }
     }
     $this->_selectQuery = $this->_DBHandle->prepare("SELECT value FROM kvp_" . $this->_TableName . " WHERE id = :id");
     $this->_insertQuery = $this->_DBHandle->prepare("INSERT OR REPLACE INTO kvp_" . $this->_TableName . " VALUES(:id,:data)");
     $this->_updateQuery = $this->_DBHandle->prepare("UPDATE kvp_" . $this->_TableName . " SET id=:toId WHERE id=:fromId");
     $this->_deleteQuery = $this->_DBHandle->prepare("DELETE FROM kvp_" . $this->_TableName . " WHERE id = :id");
 }
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:24,代码来源:SQLite3.php

示例4: __construct

 /**
  * Initialise this new cell collection
  *
  * @param PHPExcel_Worksheet $parent    The worksheet for this cell collection
  * @param array of mixed     $arguments Additional initialisation arguments
  */
 public function __construct(PHPExcel_Worksheet $parent, $arguments)
 {
     $cacheTime = isset($arguments['cacheTime']) ? $arguments['cacheTime'] : 600;
     if (is_null($this->cachePrefix)) {
         $baseUnique = $this->getUniqueID();
         $this->cachePrefix = substr(md5($baseUnique), 0, 8) . '.';
         $this->cacheTime = $cacheTime;
         parent::__construct($parent);
     }
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:16,代码来源:Wincache.php

示例5: 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

示例6: __construct

 /**
  * Initialise this new cell collection
  *
  * @param	PHPExcel_Worksheet	$parent		The worksheet for this cell collection
  * @param	array of mixed		$arguments	Additional initialisation arguments
  */
 public function __construct(PHPExcel_Worksheet $parent, $arguments)
 {
     $this->_memoryCacheSize = isset($arguments['memoryCacheSize']) ? $arguments['memoryCacheSize'] : '1MB';
     parent::__construct($parent);
     if (is_null($this->_fileHandle)) {
         $this->_fileHandle = fopen('php://temp/maxmemory:' . $this->_memoryCacheSize, 'a+');
     }
 }
开发者ID:sirfsonuji,项目名称:SAM-API,代码行数:14,代码来源:PHPTemp.php

示例7: getCellList

 /**
  * Get a list of all cell addresses currently held in cache
  *
  * @return  array of string
  */
 public function getCellList()
 {
     if ($this->_currentObjectID !== null) {
         $this->_storeData();
     }
     return parent::getCellList();
 }
开发者ID:ljhchshm,项目名称:weixin,代码行数:12,代码来源:Igbinary.php

示例8: __construct

 /**
  * Initialise this new cell collection
  *
  * @param    PHPExcel_Worksheet    $parent        The worksheet for this cell collection
  * @param    array of mixed        $arguments    Additional initialisation arguments
  */
 public function __construct(PHPExcel_Worksheet $parent, $arguments)
 {
     $this->_cacheDirectory = isset($arguments['dir']) && $arguments['dir'] !== NULL ? $arguments['dir'] : PHPExcel_Shared_File::sys_get_temp_dir();
     parent::__construct($parent);
     if (is_null($this->_fileHandle)) {
         $baseUnique = $this->_getUniqueID();
         $this->_fileName = $this->_cacheDirectory . '/PHPExcel.' . $baseUnique . '.cache';
         $this->_fileHandle = fopen($this->_fileName, 'a+');
     }
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:16,代码来源:DiscISAM.php

示例9: 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();
     $newFileName = $this->_cacheDirectory . '/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:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:19,代码来源:DiscISAM.php

示例10: getWorksheet

 /**
  *	Get parent worksheet
  *
  *	@return PHPExcel_Worksheet
  */
 public function getWorksheet()
 {
     return $this->_parent->getParent();
 }
开发者ID:YellowYellow,项目名称:Graduation-Project,代码行数:9,代码来源:Cell.php

示例11: __construct

 public function __construct(PHPExcel_Worksheet $parent)
 {
     parent::__construct($parent);
     if (is_null($this->_fileHandle)) {
         if (function_exists('posix_getpid')) {
             $baseUnique = posix_getpid();
         } else {
             $baseUnique = mt_rand();
         }
         $this->_fileName = sys_get_temp_dir() . '/PHPExcel.' . uniqid($baseUnique, true) . '.cache';
         $this->_fileHandle = fopen($this->_fileName, 'a+');
     }
 }
开发者ID:bshaffer,项目名称:Donate-Nashville,代码行数:13,代码来源:DiscISAM.php

示例12: 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:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:30,代码来源:Memcache.php

示例13: __construct

 public function __construct(PHPExcel_Worksheet $parent, $arguments)
 {
     $cacheTime = isset($arguments['cacheTime']) ? $arguments['cacheTime'] : 600;
     if (is_null($this->_cachePrefix)) {
         if (function_exists('posix_getpid')) {
             $baseUnique = posix_getpid();
         } else {
             $baseUnique = mt_rand();
         }
         $this->_cachePrefix = substr(md5(uniqid($baseUnique, true)), 0, 8) . '.';
         $this->_cacheTime = $cacheTime;
         parent::__construct($parent);
     }
 }
开发者ID:kumarsivarajan,项目名称:ctrl-dock,代码行数:14,代码来源:APC.php

示例14: __construct

 public function __construct(PHPExcel_Worksheet $parent, $arguments)
 {
     $memcacheServer = isset($arguments['memcacheServer']) ? $arguments['memcacheServer'] : 'localhost';
     $memcachePort = isset($arguments['memcachePort']) ? $arguments['memcachePort'] : 11211;
     $cacheTime = isset($arguments['cacheTime']) ? $arguments['cacheTime'] : 600;
     if (is_null($this->_cachePrefix)) {
         if (function_exists('posix_getpid')) {
             $baseUnique = posix_getpid();
         } else {
             $baseUnique = mt_rand();
         }
         $this->_cachePrefix = substr(md5(uniqid($baseUnique, true)), 0, 8) . '.';
         //	Set a new Memcache object and connect to the Memcache server
         $this->_memcache = new Memcache();
         if (!$this->_memcache->connect($memcacheServer, $memcachePort)) {
             throw new Exception('Could not connect to Memcache server at ' . $memcacheServer . ':' . $memcachePort);
         }
         $this->_cacheTime = $cacheTime;
         parent::__construct($parent);
     }
 }
开发者ID:bshaffer,项目名称:Donate-Nashville,代码行数:21,代码来源:Memcache.php

示例15: __construct

 /**
  * Initialise this new cell collection
  *
  * @param	PHPExcel_Worksheet	$parent		The worksheet for this cell collection
  * @param	array of mixed		$arguments	Additional initialisation arguments
  */
 public function __construct(PHPExcel_Worksheet $parent, $arguments)
 {
     $this->_cacheDirectory = isset($arguments['dir']) && $arguments['dir'] !== NULL ? $arguments['dir'] : LEAFLET_PLUGIN_ICONS_DIR;
     parent::__construct($parent);
     if (is_null($this->_fileHandle)) {
         $baseUnique = $this->_getUniqueID();
         $this->_fileName = $this->_cacheDirectory . '/PHPExcel.' . $baseUnique . '.cache';
         $this->_fileHandle = fopen($this->_fileName, 'a+');
     }
 }
开发者ID:qcstw-dev,项目名称:qcsasia,代码行数:16,代码来源:DiscISAM.php


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