diff options
author | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
commit | eab8a101e7a3fcbb41e01a574985e06c5a3775de (patch) | |
tree | 60f201da5984b0c3638d10da02bba42b61aa3177 /lib/smarty3/sysplugins/smarty_template_config.php | |
parent | 7f38be342c1495aeca418286c15c25c18ac9e142 (diff) |
Updating Smarty
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_template_config.php')
-rw-r--r-- | lib/smarty3/sysplugins/smarty_template_config.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/smarty3/sysplugins/smarty_template_config.php b/lib/smarty3/sysplugins/smarty_template_config.php index 44cdba6..850ae32 100644 --- a/lib/smarty3/sysplugins/smarty_template_config.php +++ b/lib/smarty3/sysplugins/smarty_template_config.php @@ -14,7 +14,6 @@ * @package Smarty * @subpackage TemplateResources * @author Uwe Tews - * */ class Smarty_Template_Config extends Smarty_Template_Source { @@ -64,16 +63,18 @@ class Smarty_Template_Config extends Smarty_Template_Source * initialize Source Object for given resource * Either [$_template] or [$smarty, $template_resource] must be specified * - * @param Smarty_Internal_Template $_template template object - * @param Smarty $smarty smarty object - * @param string $template_resource resource identifier + * @param Smarty_Internal_Template $_template template object + * @param Smarty $smarty smarty object + * @param string $template_resource resource identifier * * @return Smarty_Template_Config Source Object * @throws SmartyException */ - public static function load(Smarty_Internal_Template $_template = null, Smarty $smarty = null, - $template_resource = null) - { + public static function load( + Smarty_Internal_Template $_template = null, + Smarty $smarty = null, + $template_resource = null + ) { static $_incompatible_resources = array('extends' => true, 'php' => true); if ($_template) { $smarty = $_template->smarty; @@ -82,11 +83,11 @@ class Smarty_Template_Config extends Smarty_Template_Source if (empty($template_resource)) { throw new SmartyException('Source: Missing name'); } - // parse resource_name, load resource handler + // parse resource_name, load resource handler list($name, $type) = Smarty_Resource::parseResourceName($template_resource, $smarty->default_config_type); // make sure configs are not loaded via anything smarty can't handle if (isset($_incompatible_resources[ $type ])) { - throw new SmartyException ("Unable to use resource '{$type}' for config"); + throw new SmartyException("Unable to use resource '{$type}' for config"); } $source = new Smarty_Template_Config($smarty, $template_resource, $type, $name); $source->handler->populate($source, $_template); |