ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPExcel_CachedObjectStorageFactory Class Reference
+ Collaboration diagram for PHPExcel_CachedObjectStorageFactory:

Static Public Member Functions

static getCacheStorageMethod ()
 Return the current cache storage method. More...
 
static getCacheStorageClass ()
 Return the current cache storage class. More...
 
static getAllCacheStorageMethods ()
 Return the list of all possible cache storage methods. More...
 
static getCacheStorageMethods ()
 Return the list of all available cache storage methods. More...
 
static initialize ($method=self::cache_in_memory, $arguments=array())
 Identify the cache storage method to use. More...
 
static getInstance (PHPExcel_Worksheet $parent)
 Initialise the cache storage. More...
 
static finalize ()
 Clear the cache storage. More...
 

Data Fields

const cache_in_memory = 'Memory'
 
const cache_in_memory_gzip = 'MemoryGZip'
 
const cache_in_memory_serialized = 'MemorySerialized'
 
const cache_igbinary = 'Igbinary'
 
const cache_to_discISAM = 'DiscISAM'
 
const cache_to_apc = 'APC'
 
const cache_to_memcache = 'Memcache'
 
const cache_to_phpTemp = 'PHPTemp'
 
const cache_to_wincache = 'Wincache'
 
const cache_to_sqlite = 'SQLite'
 
const cache_to_sqlite3 = 'SQLite3'
 

Static Private Attributes

static $_cacheStorageMethod = NULL
 
static $_cacheStorageClass = NULL
 
static $_storageMethods
 
static $_storageMethodDefaultParameters
 
static $_storageMethodParameters = array()
 

Detailed Description

Definition at line 37 of file CachedObjectStorageFactory.php.

Member Function Documentation

◆ finalize()

static PHPExcel_CachedObjectStorageFactory::finalize ( )
static

Clear the cache storage.

Definition at line 244 of file CachedObjectStorageFactory.php.

References array.

Referenced by CellCollectionTest\testCacheLastCell().

245  {
246  self::$_cacheStorageMethod = NULL;
247  self::$_cacheStorageClass = NULL;
248  self::$_storageMethodParameters = array();
249  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getAllCacheStorageMethods()

static PHPExcel_CachedObjectStorageFactory::getAllCacheStorageMethods ( )
static

Return the list of all possible cache storage methods.

Returns
string[]

Definition at line 155 of file CachedObjectStorageFactory.php.

156  {
157  return self::$_storageMethods;
158  } // function getCacheStorageMethods()

◆ getCacheStorageClass()

static PHPExcel_CachedObjectStorageFactory::getCacheStorageClass ( )
static

Return the current cache storage class.

Returns
PHPExcel_CachedObjectStorage_ICache|NULL

Definition at line 144 of file CachedObjectStorageFactory.php.

Referenced by PHPExcel_Settings\getCacheStorageClass().

145  {
146  return self::$_cacheStorageClass;
147  } // function getCacheStorageClass()
+ Here is the caller graph for this function:

◆ getCacheStorageMethod()

static PHPExcel_CachedObjectStorageFactory::getCacheStorageMethod ( )
static

Return the current cache storage method.

Returns
string|NULL

Definition at line 133 of file CachedObjectStorageFactory.php.

Referenced by PHPExcel_Settings\getCacheStorageMethod().

134  {
135  return self::$_cacheStorageMethod;
136  } // function getCacheStorageMethod()
+ Here is the caller graph for this function:

◆ getCacheStorageMethods()

static PHPExcel_CachedObjectStorageFactory::getCacheStorageMethods ( )
static

Return the list of all available cache storage methods.

Returns
string[]

Definition at line 166 of file CachedObjectStorageFactory.php.

References array.

Referenced by CellCollectionTest\testCacheLastCell().

167  {
168  $activeMethods = array();
169  foreach(self::$_storageMethods as $storageMethod) {
170  $cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $storageMethod;
171  if (call_user_func(array($cacheStorageClass, 'cacheMethodIsAvailable'))) {
172  $activeMethods[] = $storageMethod;
173  }
174  }
175  return $activeMethods;
176  } // function getCacheStorageMethods()
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getInstance()

static PHPExcel_CachedObjectStorageFactory::getInstance ( PHPExcel_Worksheet  $parent)
static

Initialise the cache storage.

Parameters
PHPExcel_Worksheet$parentEnable cell caching for this worksheet
Returns
PHPExcel_CachedObjectStorage_ICache

Definition at line 220 of file CachedObjectStorageFactory.php.

Referenced by PHPExcel_Worksheet\__construct().

221  {
222  $cacheMethodIsAvailable = TRUE;
223  if (self::$_cacheStorageMethod === NULL) {
224  $cacheMethodIsAvailable = self::initialize();
225  }
226 
227  if ($cacheMethodIsAvailable) {
228  $instance = new self::$_cacheStorageClass( $parent,
229  self::$_storageMethodParameters[self::$_cacheStorageMethod]
230  );
231  if ($instance !== NULL) {
232  return $instance;
233  }
234  }
235 
236  return FALSE;
237  } // function getInstance()
+ Here is the caller graph for this function:

◆ initialize()

static PHPExcel_CachedObjectStorageFactory::initialize (   $method = self::cache_in_memory,
  $arguments = array() 
)
static

Identify the cache storage method to use.

Parameters
string$methodName of the method to use for cell cacheing
arrayof mixed $arguments Additional arguments to pass to the cell caching class when instantiating
Returns
boolean

Definition at line 187 of file CachedObjectStorageFactory.php.

References array.

Referenced by PHPExcel_Settings\setCacheStorageMethod(), and CellCollectionTest\testCacheLastCell().

188  {
189  if (!in_array($method,self::$_storageMethods)) {
190  return FALSE;
191  }
192 
193  $cacheStorageClass = 'PHPExcel_CachedObjectStorage_'.$method;
194  if (!call_user_func(array( $cacheStorageClass,
195  'cacheMethodIsAvailable'))) {
196  return FALSE;
197  }
198 
199  self::$_storageMethodParameters[$method] = self::$_storageMethodDefaultParameters[$method];
200  foreach($arguments as $k => $v) {
201  if (array_key_exists($k, self::$_storageMethodParameters[$method])) {
202  self::$_storageMethodParameters[$method][$k] = $v;
203  }
204  }
205 
206  if (self::$_cacheStorageMethod === NULL) {
207  self::$_cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $method;
208  self::$_cacheStorageMethod = $method;
209  }
210  return TRUE;
211  } // function initialize()
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

Field Documentation

◆ $_cacheStorageClass

PHPExcel_CachedObjectStorageFactory::$_cacheStorageClass = NULL
staticprivate

Definition at line 64 of file CachedObjectStorageFactory.php.

◆ $_cacheStorageMethod

PHPExcel_CachedObjectStorageFactory::$_cacheStorageMethod = NULL
staticprivate

Definition at line 57 of file CachedObjectStorageFactory.php.

◆ $_storageMethodDefaultParameters

PHPExcel_CachedObjectStorageFactory::$_storageMethodDefaultParameters
staticprivate
Initial value:
self::cache_in_memory => array(
),
self::cache_in_memory_gzip => array(
),
self::cache_in_memory_serialized => array(
),
self::cache_igbinary => array(
),
self::cache_to_phpTemp => array( 'memoryCacheSize' => '1MB'
),
self::cache_to_discISAM => array( 'dir' => NULL
),
self::cache_to_apc => array( 'cacheTime' => 600
),
self::cache_to_memcache => array( 'memcacheServer' => 'localhost',
'memcachePort' => 11211,
'cacheTime' => 600
),
self::cache_to_wincache => array( 'cacheTime' => 600
),
self::cache_to_sqlite => array(
),
self::cache_to_sqlite3 => array(
),
)

Definition at line 92 of file CachedObjectStorageFactory.php.

◆ $_storageMethodParameters

PHPExcel_CachedObjectStorageFactory::$_storageMethodParameters = array()
staticprivate

Definition at line 125 of file CachedObjectStorageFactory.php.

◆ $_storageMethods

PHPExcel_CachedObjectStorageFactory::$_storageMethods
staticprivate
Initial value:
self::cache_in_memory,
self::cache_in_memory_gzip,
self::cache_in_memory_serialized,
self::cache_igbinary,
self::cache_to_phpTemp,
self::cache_to_discISAM,
self::cache_to_apc,
self::cache_to_memcache,
self::cache_to_wincache,
self::cache_to_sqlite,
self::cache_to_sqlite3,
)

Definition at line 72 of file CachedObjectStorageFactory.php.

◆ cache_igbinary

const PHPExcel_CachedObjectStorageFactory::cache_igbinary = 'Igbinary'

Definition at line 42 of file CachedObjectStorageFactory.php.

◆ cache_in_memory

const PHPExcel_CachedObjectStorageFactory::cache_in_memory = 'Memory'

Definition at line 39 of file CachedObjectStorageFactory.php.

◆ cache_in_memory_gzip

const PHPExcel_CachedObjectStorageFactory::cache_in_memory_gzip = 'MemoryGZip'

Definition at line 40 of file CachedObjectStorageFactory.php.

◆ cache_in_memory_serialized

const PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized = 'MemorySerialized'

Definition at line 41 of file CachedObjectStorageFactory.php.

◆ cache_to_apc

const PHPExcel_CachedObjectStorageFactory::cache_to_apc = 'APC'

Definition at line 44 of file CachedObjectStorageFactory.php.

◆ cache_to_discISAM

const PHPExcel_CachedObjectStorageFactory::cache_to_discISAM = 'DiscISAM'

Definition at line 43 of file CachedObjectStorageFactory.php.

◆ cache_to_memcache

const PHPExcel_CachedObjectStorageFactory::cache_to_memcache = 'Memcache'

Definition at line 45 of file CachedObjectStorageFactory.php.

◆ cache_to_phpTemp

const PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp = 'PHPTemp'

Definition at line 46 of file CachedObjectStorageFactory.php.

◆ cache_to_sqlite

const PHPExcel_CachedObjectStorageFactory::cache_to_sqlite = 'SQLite'

Definition at line 48 of file CachedObjectStorageFactory.php.

◆ cache_to_sqlite3

const PHPExcel_CachedObjectStorageFactory::cache_to_sqlite3 = 'SQLite3'

Definition at line 49 of file CachedObjectStorageFactory.php.

◆ cache_to_wincache

const PHPExcel_CachedObjectStorageFactory::cache_to_wincache = 'Wincache'

Definition at line 47 of file CachedObjectStorageFactory.php.


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