public function __construct(string $templatePath) { parent::__construct($templatePath); $this->smarty = new \Smarty(); $this->smarty->setTemplateDir($templatePath); $this->smarty->setCompileDir(APPLICATION . 'storage/templates_c/'); $this->smarty->setConfigDir(APPLICATION . 'storage/configs/'); $this->smarty->setCacheDir(APPLICATION . 'storage/cache/'); $this->smarty->setCaching(true); $this->smarty->cache_lifetime = 24 * 60 * 60; //1 day $this->smarty->compile_check = AppSettings::$smarty_compile_check; $this->smarty->auto_literal = false; Settings::settings_map(function ($ns_path) { $this->smarty->registerClass(class_basename($ns_path), $ns_path); }); }
<?php \SCT\Settings\Settings::init('local');