/** * Get template engine * * @return Smarty */ public static function TPL() { if (self::$tpl == null) { self::$tpl = new Smarty(); self::$tpl->template_dir = PATH . "/templates"; self::$tpl->compile_dir = PATH . "/templates_c"; self::$tpl->cache_dir = PATH . "/cache"; self::$tpl->assign("app_dir", APP_DIR); self::$tpl->assign("img_dir", APP_DIR . "static/images/"); self::$tpl->assign("css_dir", APP_DIR . "static/css/"); self::$tpl->assign("js_dir", APP_DIR . "static/js/"); } return self::$tpl; }