protected function __construct($languageCode = null) { $resources = new Resources(); if (!empty($languageCode)) { $resources->SetLanguage($languageCode); } $this->email = new SmartyPage($resources); $this->Set('ScriptUrl', Configuration::Instance()->GetScriptUrl()); $this->Set('Charset', $resources->Charset); }
public function __construct($languageCode = null) { $this->Resources = new Resources(); if (!empty($languageCode)) { $this->Resources->SetLanguage($languageCode); } $this->assign('Charset', $this->Resources->Charset); $this->assign('ScriptUrl', Configuration::Instance()->GetScriptUrl()); $this->template_dir = ROOT_DIR . 'lang'; $this->compile_dir = ROOT_DIR . 'tpl_c'; $this->config_dir = ROOT_DIR . 'configs'; $this->cache_dir = ROOT_DIR . 'cache'; $cacheTemplates = Configuration::Instance()->GetKey(ConfigKeys::CACHE_TEMPLATES, new BooleanConverter()); $this->compile_check = !$cacheTemplates; // should be set to false in production $this->force_compile = !$cacheTemplates; // should be set to false in production $this->RegisterFunctions(); }