26 $this->short_open_tag = ini_get(
'short_open_tag' );
38 $source->filepath = $this->
buildFilepath($source, $_template);
40 if ($source->filepath !==
false) {
41 if (is_object($source->smarty->security_policy)) {
42 $source->smarty->security_policy->isTrustedResourceDir($source->filepath);
45 $source->uid = sha1($source->filepath);
46 if ($source->smarty->compile_check) {
47 $source->timestamp = @filemtime($source->filepath);
48 $source->exists = !!$source->timestamp;
61 $source->timestamp = @filemtime($source->filepath);
62 $source->exists = !!$source->timestamp;
74 if ($source->timestamp) {
77 throw new SmartyException(
"Unable to read template {$source->type} '{$source->name}'");
90 $_smarty_template = $_template;
92 if (!$source->smarty->allow_php_templates) {
95 if (!$source->exists) {
97 $parent_resource =
" in '{$_template->parent->template_resource}'";
99 $parent_resource =
'';
101 throw new SmartyException(
"Unable to load template {$source->type} '{$source->name}'{$parent_resource}");
108 @ini_set(
'short_open_tag',
'1' );
109 include($source->filepath);
110 @ini_set(
'short_open_tag', $this->short_open_tag );
populateTimestamp(Smarty_Template_Source $source)
populate Source Object with timestamp and exists from Resource
getContent(Smarty_Template_Source $source)
Load template's source from file into current template object.
renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template)
Render and output the template (without using the compiler)
buildFilepath(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
build template filepath by traversing the template_dir array
__construct()
Create a new PHP Resource.
populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
populate Source Object with meta data from Resource
getTemplateVars($varname=null, $_ptr=null, $search_parents=true)
Returns a single or all template variables.