예제 #1
0
 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);
 }
예제 #2
0
 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;
 }