class.rFastTemplate.php(三)
// // Description // Perform substitution on the template. We do not really recurse // downward in the sense that we do not do subsitutions on inferior // templates. For each inferior template which is a part of this // template, we insert the current value of their results. // // Notes // Do I want to make this return a reference? function subst ($handle, $tag, $autoload = true) { $append = false; $debug = $this->DEBUGALL || $this->DEBUG[''subst'']; $this->LAST = $handle; if ($debug) $this->logwrite ("subst (handle=$handle, tag=$tag, autoload=$autoload)"); // For compatibility with FastTemplate, the results need to overwrite // for an array. This really only seems to be useful in the case of // something like // $t->parse (''MAIN'', array (''array'', ''main'')); // Where the ''main'' template has a variable named MAIN which will be // set on the first pass (i.e., when parasing ''array'') and used on the // second pass (i.e., when parsing ''main''). if (gettype($tag) == ''array'') { foreach (array_values($tag) as $t) { & |
查看所有评论
