From a715e679758e8cbeb02f6cd4607f8b05b625e48f Mon Sep 17 00:00:00 2001 From: nbm Date: Fri, 22 Jul 2005 13:48:13 +0000 Subject: [PATCH] KTSmartyTemplate implements the KTTemplate interface, using the Smarty templating language. --- lib/templating/smartytemplate.inc.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+), 0 deletions(-) create mode 100644 lib/templating/smartytemplate.inc.php diff --git a/lib/templating/smartytemplate.inc.php b/lib/templating/smartytemplate.inc.php new file mode 100644 index 0000000..3422dea --- /dev/null +++ b/lib/templating/smartytemplate.inc.php @@ -0,0 +1,45 @@ +KTTemplate($sPath); + } + + function render($aDict) { + $smarty = new Smarty; + $smarty->compile_dir = "/tmp"; + foreach ($aDict as $k => $v) { + $smarty->assign($k, $v); + } + return $smarty->fetch($this->sPath); + } +} + +?> -- libgit2 0.21.4