Ejemplo n.º 1
0
 public function __construct(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);
     }
 }
Ejemplo n.º 2
0
 public function __construct(Worksheet $parent, $memoryCacheSize = '1MB')
 {
     $memoryCacheSize = isset($arguments['memoryCacheSize']) ? $arguments['memoryCacheSize'] : '1MB';
     parent::__construct($parent);
     if (is_null($this->_fileHandle)) {
         $this->_fileHandle = fopen('php://temp/maxmemory:' . $memoryCacheSize, 'a+');
     }
 }
Ejemplo n.º 3
0
 public function __construct(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+');
     }
 }