标签:
1. 控制器IndexAction.class.php
function index()
$this -> display(); (父类Action的display)
2. 父类ThinkPHP/Lib/Core/Action.class.php
function display()
$this->view->display
3. ThinkPHP/Lib/Core/View.class.php
function display()
$this->fetch()
function fetch()
tag(‘view_parse‘,$params);
ThinkPHP/Conf/tags.php
view_parse => parseTemplate(Behavior行为)
4. 行为ThinkPHP/Lib/Behavior/parseTempateBehavior.class.php
function run()
$class = "TemplateSmarty";
$tpl = new $class
$tpl -> fetch()
5. TemplateSmarty.class.php
ThinkPHP/Extend/Driver/Template/TemplateSmarty.class.php
function fetch()
vendor(‘Smarty.Smarty#class‘);
//ThinkPHP/Extend/Vendor/Smarty/Smarty.class.php
获取真正的smarty
new Smarty();
C()函数会读取配置变量信息(convertion.php config.php)
标签:
原文地址:http://www.cnblogs.com/yizhinageyuanfang/p/5518574.html