You are here

public static function PHPExcel_CachedObjectStorageFactory::initialize in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorageFactory.php \PHPExcel_CachedObjectStorageFactory::initialize()

Identify the cache storage method to use

Parameters

string $method Name of the method to use for cell cacheing:

array of mixed $arguments Additional arguments to pass to the cell caching class: when instantiating

Return value

boolean

3 calls to PHPExcel_CachedObjectStorageFactory::initialize()
CellCollectionTest::testCacheLastCell in vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Worksheet/CellCollectionTest.php
PHPExcel_CachedObjectStorageFactory::getInstance in vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorageFactory.php
Initialise the cache storage
PHPExcel_Settings::setCacheStorageMethod in vendor/phpoffice/phpexcel/Classes/PHPExcel/Settings.php
Set the method that should be used for cell cacheing

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorageFactory.php, line 187

Class

PHPExcel_CachedObjectStorageFactory
PHPExcel_CachedObjectStorageFactory

Code

public static function initialize($method = self::cache_in_memory, $arguments = array()) {
  if (!in_array($method, self::$_storageMethods)) {
    return FALSE;
  }
  $cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $method;
  if (!call_user_func(array(
    $cacheStorageClass,
    'cacheMethodIsAvailable',
  ))) {
    return FALSE;
  }
  self::$_storageMethodParameters[$method] = self::$_storageMethodDefaultParameters[$method];
  foreach ($arguments as $k => $v) {
    if (array_key_exists($k, self::$_storageMethodParameters[$method])) {
      self::$_storageMethodParameters[$method][$k] = $v;
    }
  }
  if (self::$_cacheStorageMethod === NULL) {
    self::$_cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $method;
    self::$_cacheStorageMethod = $method;
  }
  return TRUE;
}