示例#1
0
 public static function getInstance(Wee $wee, $template, $config = [])
 {
     $instance = parent::getInstance($wee, $template, $config);
     if (isset($instance->_config['smarty_class_path']) && file_exists($instance->_config['smarty_class_path'])) {
         include_once $instance->_config['smarty_class_path'];
     }
     $instance->smarty = new SmartyBC();
     return $instance;
 }
示例#2
0
 public static function getInstance(Wee $wee, $template, $config = [])
 {
     $instance = parent::getInstance($wee, $template, $config);
     if ($instance->_config['use_twig_autoloader']) {
         require_once $instance->_config['twig_path'] . '/lib/Twig/Autoloader.php';
         Twig_Autoloader::register();
     }
     $instance->loader = new Twig_Loader_Array([]);
     $instance->twig = new Twig_Environment($instance->loader);
     return $instance;
 }