public function processBlockLogic($template, $blockName, $params) { $fileName = $this->getValidFileSystemName($template->getName()) . '/' . $this->getValidFileSystemName($blockName) . '.php'; if (!$this->cache->isCacheExists($fileName)) { $this->cache->save($fileName, '<?php ' . $this->getLogicText($template->getBlockLogic($blockName), 'Jte\\Language\\BlockLogic')); } return require $this->cache->getFilePath($fileName); }
public function getTemplateData($templateName) { if ($this->cache->isCacheExists($templateName)) { $data = (include $this->cache->getFilePath($templateName)); } else { $data = $this->parser->getTemplateData($templateName); $this->cache->save($templateName, '<?php return ' . var_export($data, 1) . ';'); } return $data; }