added 'getPhpContents()' to FileManager

This commit is contained in:
Taras Machyshyn
2015-01-20 12:22:04 +02:00
parent 0194d364b8
commit 832c63e014
14 changed files with 88 additions and 70 deletions
+2 -2
View File
@@ -84,12 +84,12 @@ class Module
protected function init()
{
if (file_exists($this->cacheFile) && $this->getConfig()->get('useCache')) {
$this->data = $this->getFileManager()->getContents($this->cacheFile);
$this->data = $this->getFileManager()->getPhpContents($this->cacheFile);
} else {
$this->data = $this->getUnifier()->unify($this->paths, true);
if ($this->getConfig()->get('useCache')) {
$result = $this->getFileManager()->putContentsPHP($this->cacheFile, $this->data);
$result = $this->getFileManager()->putPhpContents($this->cacheFile, $this->data);
if ($result == false) {
throw new \Espo\Core\Exceptions\Error('Module - Cannot save unified modules.');
}