Smarty类变量

  • $template_dir [模板目录变量]
  • $compile_dir [编译目录变量]
  • $config_dir [配置目录变量]
  • $plugins_dir [插件目录变量]
  • $debugging [调试变量]
  • $debug_tpl [调试模板变量]
  • $debugging_ctrl [调试控制变量]
  • $auto_literal [自动忽略解析]
  • $autoload_filters [自动加载过滤器变量]
  • $compile_check [编译检查变量]
  • $force_compile [强迫编译变量]
  • $caching [缓存变量]
  • $cache_dir [缓存目录变量]
  • $cache_lifetime [缓存生存时间变量]
  • $cache_handler_func [缓存处理函数变量]
  • $cache_modified_check [缓存修正检查变量]
  • $config_overwrite [配置.覆盖变量]
  • $config_booleanize [配置.布尔型变量]
  • $config_read_hidden [配置.读取隐藏变量]
  • $config_fix_newlines [配置.固定换行符变量]
  • $default_template_handler_func [默认模板处理函数变量]
  • $php_handling [PHP处理变量]
  • $trusted_dir [信任目录变量]
  • $left_delimiter [左定界符变量]
  • $right_delimiter [右定界符变量]
  • $compiler_class [编译类变量]
  • $request_vars_order [变量顺序变量]
  • $request_use_auto_globals [自动全局变量]
  • $compile_id [编译ID变量]
  • $use_sub_dirs [子目录变量]
  • $default_modifiers [默认调节器变量]
  • $default_resource_type [默认源类型变量]

    你可以直接访问它们,或者使用对应的setter/getter方法。

    所有类变量都有自己的魔术setter/getter方法,setter/getter方法为驼峰命名格式(译注:类方法见下一章),这与变量本身不同(译注:类变量正如你所见到的,为单词间加下划线'_')。因此,举例说,你可以使用$smarty->setTemplateDir($dir)和$dir = $smarty->getTemplateDir()分别设置和读取$smarty->template_dir变量。


posted @ 2012-03-09 10:19  haiwei.sun  阅读(201)  评论(0编辑  收藏  举报
返回顶部