예제 #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
파일: WeeTwig.php 프로젝트: gymadarasz/wee
 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;
 }