/** * Returns a writable directory for temporary files * * @return String * @see Configuration::setTempDirectory() * @throws NoTempDirectoryException */ public function getTempDirectory() { if (!is_null($this->configuration->getTempDirectory())) { return $this->configuration->getTempDirectory(); } if (is_null($this->cachedTempDirectory)) { $this->cachedTempDirectory = $this->findTempDirectory(); } return $this->cachedTempDirectory; }