深圳全飞鸿

标题: Smarty3 类结构探讨 [打印本页]

作者: zhgc    时间: 2019-9-4 14:39
标题: Smarty3 类结构探讨
本帖最后由 zhgc 于 2019-9-4 14:41 编辑

Smarty3 内部几个类的关系如下:

  1. class Smarty                   extends Smarty_Internal_TemplateBase
  2. class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
  3. abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
  4. abstract class Smarty_Internal_Data

  5. class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCompilerBase
  6. abstract class Smarty_Internal_TemplateCompilerBase
复制代码



1.分析$_tag_stack在哪?
Fatal error: Uncaught --> Smarty: Smarty_Internal_Templatetemplate property '_tag_stack' does not exist.
$_tag_stack定义在Smarty_Internal_TemplateCompilerBase

2. Smarty_Internal_Data的三种存在
Smarty_Internal_Data { /** * This object type (Smarty = 1, template = 2, data = 4)





欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2