mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-29 10:13:25 +02:00
Update PSR-2
This commit is contained in:
@@ -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
|
||||
@@ -76,8 +76,8 @@ class Smarty_Internal_Resource_Php extends Smarty_Internal_Resource_File
|
||||
/**
|
||||
* 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,8 +88,10 @@ 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
|
||||
@@ -99,11 +101,14 @@ class Smarty_Internal_Resource_Php extends Smarty_Internal_Resource_File
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user