protected function getFileContent($filename) { if ($this->isEncryptedFile($filename)) { return $this->getDecryptedFilecontent($filename); } if (!is_file($filename)) { // try if there's an encrpyted version of this file try { $encryptedFilename = $this->getEncryptedFileName($filename); return $this->getDecryptedFilecontent($encryptedFilename); } catch (FileNotFoundException $e) { throw new FileNotFoundException("Could not find '{$filename}' or '{$encryptedFilename}'", 0, $e); } } return file_get_contents($filename); }