public setUseDiskCaching ( boolean $pValue = false, string $pDirectory = null ) : |
||
$pValue | boolean | |
$pDirectory | string | Disk caching directory |
return |
public function setUseDiskCaching($pValue = false, $pDirectory = null)
{
$this->useDiskCaching = $pValue;
if (!is_null($pDirectory)) {
if (!is_dir($pDirectory)) {
throw new \Exception("Directory does not exist: {$pDirectory}");
}
$this->diskCachingDir = $pDirectory;
}
return $this;
}
public function testXMLWriterWithDiskCaching() { $oPowerPoint2007 = new PowerPoint2007(); $oPowerPoint2007->setUseDiskCaching(true); $oRels = new Rels(); $oRels->setParentWriter($oPowerPoint2007); $this->assertNotEmpty(\PHPUnit_Framework_Assert::readAttribute($this->runProtectedMethod($oRels, 'getXMLWriter'), 'tempFileName')); }