You are here

public function PHPExcel_Writer_Abstract::setUseDiskCaching in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Abstract.php \PHPExcel_Writer_Abstract::setUseDiskCaching()

* Set use disk caching where possible? * *

Parameters

boolean $pValue: * @param string $pDirectory Disk caching directory * @throws PHPExcel_Writer_Exception when directory does not exist * @return PHPExcel_Writer_Excel2007

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Abstract.php, line 137

Class

PHPExcel_Writer_Abstract
PHPExcel_Writer_Abstract

Code

public function setUseDiskCaching($pValue = FALSE, $pDirectory = NULL) {
  $this->_useDiskCaching = $pValue;
  if ($pDirectory !== NULL) {
    if (is_dir($pDirectory)) {
      $this->_diskCachingDirectory = $pDirectory;
    }
    else {
      throw new PHPExcel_Writer_Exception("Directory does not exist: {$pDirectory}");
    }
  }
  return $this;
}