/** * 构造函数 * * @return FLEA_View_Lite */ function FLEA_View_Lite() { parent::Template_Lite(); $viewConfig = FLEA::getAppInf('viewConfig'); if (is_array($viewConfig)) { foreach ($viewConfig as $key => $value) { if (isset($this->{$key})) { $this->{$key} = $value; } } } FLEA::loadClass('FLEA_View_SmartyHelper'); new FLEA_View_SmartyHelper($this); }
/** * Constructor * * @return CI_Template_lite */ public function CI_Template_lite() { parent::Template_Lite(); header('Content-type: text/html; charset=utf-8'); $this->compile_dir = TEMPPATH . "templates_c/"; $this->general_path = APPPATH . "views/"; if (defined('TPL_FORCE_COMPILE')) { $this->force_compile = TPL_FORCE_COMPILE; } else { $this->force_compile = false; } if (defined('TPL_DEBUGGING')) { $this->debugging = TPL_DEBUGGING; } else { $this->debugging = false; } // $this->load_filter('output', 'trimwhitespace'); $this->assign("site_url", site_url()); $this->assign("site_root", "/" . SITE_SUBFOLDER); $this->assign("base_url", base_url()); $this->assign("general_path_relative", APPPATH_VIRTUAL . "views/"); $this->assign("js_folder", APPLICATION_FOLDER . "js/"); /** * Assign common variables */ log_message('debug', "CI_Template_lite Class Initialized"); }