From 0fdcb79ec3f82b1baf403b6e4c4f32cf4cd87a8f Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Tue, 29 Sep 2009 21:00:00 +0000 Subject: [PATCH] - allow $tpl->display(), $tpl->fetch(); and $tpl->is_cached() calls on template objects --- libs/sysplugins/internal.template.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/libs/sysplugins/internal.template.php b/libs/sysplugins/internal.template.php index c516cc00..7643fd92 100644 --- a/libs/sysplugins/internal.template.php +++ b/libs/sysplugins/internal.template.php @@ -444,7 +444,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase { } } } else { - throw new Exception("Resource '$this->resource_type' must use compiler"); + throw new Exception("Resource '$this->resource_type' must use compiler"); } $this->render_time += $this->_get_time() - $_start_time; $this->rendered_content = ob_get_clean(); @@ -665,6 +665,29 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase { } } } + + /** + * wrapper for display + */ + public function display () + { + return $this->smarty->display($this); + } + + /** + * wrapper for fetch + */ + public function fetch () + { + return $this->smarty->fetch($this); + } + /** + * wrapper for is_cached + */ + public function is_cached () + { + return $this->iscached(); + } } /**