/** * @return \SmartyBC * @throws \Kohana_Exception */ public static function init() { $tmp = new \SmartyBC(); $tmp->muteExpectedErrors(); //loading config file smarty $conf = \Kohana::$config->load('smarty')->get('smarty_config'); $tmp->addTemplateDir($conf['template_dir']); $tmp->setCompileDir($conf['compile_dir']); $tmp->setCacheDir($conf['cache_dir']); $tmp->setConfigDir($conf['config_dir']); $tmp->setPluginsDir($conf['plugins_dir']); $tmp->assign('base_UI', $conf['base_UI']); $tmp->assign('debugging', $conf['debugging']); $tmp->debugging = $conf['debugging']; $tmp->debugging_ctrl = $conf['debugging_ctrl']; $tmp->error_reporting = $conf['error_reporting']; return $tmp; }