/** * initialization of Smarty */ protected function init() { if (self::$smarty === NULL) { require_once dirname(__FILE__) . '/../smarty/Smarty/libs/Smarty.class.php'; // vytvorime nove smarty $smarty = new Smarty(); $smarty->template_dir = $GLOBALS['smartyDir']; $templatesC = dirname(__FILE__) . '/../tmp/smarty-dir/templates_c/'; if (!file_exists($templatesC)) { mkdir($templatesC); } // $templatesCache = $templatesC . $GLOBALS['smartyTempCacheDir']; // if (!file_exists($templatesCache)) { // mkdir($templatesCache); // } $smarty->compile_dir = $templatesC; $smarty->cache_dir = dirname(__FILE__) . '/../tmp/smarty-dir/cache/'; $smarty->config_dir = dirname(__FILE__) . '/../tmp/smarty-dir/configs/'; self::$smarty = $smarty; } }