diff options
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_php.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_php.php | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_php.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_php.php index 6f685abe4..9d98ae181 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_php.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_php.php @@ -43,7 +43,7 @@ class Smarty_Internal_Resource_Php extends Smarty_Internal_Resource_File /** * Load template's source from file into current template object * - * @param Smarty_Template_Source $source source object + * @param Smarty_Template_Source $source source object * * @return string template source * @throws SmartyException if source cannot be loaded @@ -68,16 +68,18 @@ class Smarty_Internal_Resource_Php extends Smarty_Internal_Resource_File $compiled->timestamp = $_template->source->timestamp; $compiled->exists = $_template->source->exists; $compiled->file_dependency[ $_template->source->uid ] = - array($compiled->filepath, - $compiled->timestamp, - $_template->source->type,); + array( + $compiled->filepath, + $compiled->timestamp, + $_template->source->type, + ); } /** * Render and output the template (without using the compiler) * - * @param Smarty_Template_Source $source source object - * @param Smarty_Internal_Template $_template template object + * @param Smarty_Template_Source $source source object + * @param Smarty_Internal_Template $_template template object * * @return void * @throws SmartyException if template cannot be loaded or allow_php_templates is disabled @@ -88,22 +90,25 @@ class Smarty_Internal_Resource_Php extends Smarty_Internal_Resource_File throw new SmartyException('PHP templates are disabled'); } if (!$source->exists) { - throw new SmartyException("Unable to load template '{$source->type}:{$source->name}'" . - ($_template->_isSubTpl() ? " in '{$_template->parent->template_resource}'" : '')); + throw new SmartyException( + "Unable to load template '{$source->type}:{$source->name}'" . + ($_template->_isSubTpl() ? " in '{$_template->parent->template_resource}'" : '') + ); } - // prepare variables extract($_template->getTemplateVars()); - // include PHP template with short open tags enabled if (function_exists('ini_set')) { ini_set('short_open_tag', '1'); } - /** @var Smarty_Internal_Template $_smarty_template + /** + * + * + * @var Smarty_Internal_Template $_smarty_template * used in included file */ $_smarty_template = $_template; - include($source->filepath); + include $source->filepath; if (function_exists('ini_set')) { ini_set('short_open_tag', $this->short_open_tag); } |