公有成员
FLEA_View_SmartTemplate ()
display ($tpl)
--------------------------------------------------------------------------------
详细描述
在
文件SmartTemplate.php第52行
定义。
--------------------------------------------------------------------------------
成员函数
文档
FLEA_View_SmartTemplate::FLEA_View_SmartTemplate ( )
构造函数
返回:
FLEA_View_SmartTemplate
在文件SmartTemplate.php第59行定义。
参考 FLEA::getAppInf().
FLEA_View_SmartTemplate::display ( $ tpl )
输出指定模版的内容
参数:
string $tpl
在文件SmartTemplate.php第78行定义。
--------------------------------------------------------------------------------
该类的文档由以下代码生成:
SmartTemplate.php
复制内容到剪贴板
代码:
00001 <?php
00003 // FleaPHP Framework
00004 //
00005 // Copyright (c) 2005 - 2008 QeeYuan China Inc. ([url]http://www.qeeyuan.com[/url])
00006 //
00007 // 许可协议,请查看源代码中附带的 LICENSE.txt 文件,
00008 // 或者访问 [url]http://www.fleaphp.org/[/url] 获得详细信息。
00010
00020 // {{{ includes
00021
00022 do {
00023 if (PHP5) {
00024 if (class_exists('SmartTemplate', false)) { break; }
00025 } else {
00026 if (class_exists('SmartTemplate')) { break; }
00027 }
00028
00029 $viewConfig = FLEA::getAppInf('viewConfig');
00030 if (!isset($viewConfig['smartDir'])) {
00031 FLEA::loadClass('FLEA_View_Exception_NotConfigurationSmartTemplate');
00032 return __THROW(new FLEA_View_Exception_NotConfigurationSmartTemplate());
00033 }
00034
00035 $filename = $viewConfig['smartDir'] . '/class.smarttemplate.php';
00036 if (!is_readable($filename)) {
00037 FLEA::loadClass('FLEA_View_Exception_InitSmartTemplateFailed');
00038 return __THROW(new FLEA_View_Exception_InitSmartTemplateFailed($filename));
00039 }
00040 require($filename);
00041 } while (false);
00042
00043 // }}}
00044
00052 class FLEA_View_SmartTemplate extends SmartTemplate
00053 {
00059 function FLEA_View_SmartTemplate()
00060 {
00061 parent::SmartTemplate();
00062
00063 $viewConfig = FLEA::getAppInf('viewConfig');
00064 if (is_array($viewConfig)) {
00065 foreach ($viewConfig as $key => $value) {
00066 if (isset($this->{$key})) {
00067 $this->{$key} = $value;
00068 }
00069 }
00070 }
00071 }
00072
00078 function display($tpl)
00079 {
00080 $this->tpl_file = $tpl;
00081 $this->output();
00082 }
00083 }参
[
本帖最后由 愤怒的香蕉 于 2007-11-16 10:14 编辑 ]