summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_template_config.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_template_config.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_template_config.php19
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);