lib/SmartyFactory.class.php

Go to the documentation of this file.
00001 <?php
00008 // Import Smarty class
00009 require_once(Config::instance()->smartyDir().'/Smarty.class.php');
00010 
00015 class SmartyFactory {
00020   public static function createSmarty() {
00021     $config = Config::instance();
00022     $webRoot = $config->webRoot();
00023     $smarty = new Smarty;
00024     
00025     $smartyConf = $config->smartyConf;
00026     foreach ($smartyConf as $key => $value)
00027       $smarty->$key = $value;
00028     
00029     $smarty->assign('webName',        $config->webName());
00030     $smarty->assign('webmasterMail',  $config->webmasterMail());
00031     $smarty->assign('webRoot',        $webRoot);
00032     $smarty->assign('scriptDir',      $webRoot.$config->scriptDir());
00033     $smarty->assign('styleDir',       $webRoot.$config->styleDir());
00034     $smarty->assign('imgDir',         $webRoot.$config->imgDir());
00035     
00036     return $smarty;
00037   }
00038 };
00039 ?>

Generated on Sat Mar 8 10:26:43 2008 for Dudka.cz by  doxygen 1.5.4