public function getIst() { if ($this->_file->exists() && $this->getSignatureType() !== 'gpg' && $this->_file->canVerify()) { return $this->_file->getRealHash($this->getHashType()); } else { return null; } }
/** * Construct name of fulltext cache file for given Opus_File object. * * @param Opus_File $file * @return string Name of full absolute name of fulltext cache file or null if file name could not be computed. */ private function getCachedFileName(Opus_File $file) { $config = Zend_Registry::get('Zend_Config'); try { $hash = $file->getRealHash('md5') . "-" . $file->getRealHash('sha256'); } catch (Exception $e) { $this->log->err(__CLASS__ . '::' . __METHOD__ . ' : could not compute hash values for ' . $file->getPath() . " : {$e}"); return null; } $cache_path = realpath($config->workspacePath . "/cache/"); $cache_filename = "solr_cache---{$hash}.txt"; return $cache_path . DIRECTORY_SEPARATOR . $cache_filename; }