Example #1
0
 /**
  * 单例模式,返回模板实例
  *
  * @return Object
  */
 public static function getInstance()
 {
     if (is_null(self::$_Instance)) {
         switch (TEMPLATE) {
             case 'Smarty':
                 self::_loadCore('View_Smarty');
                 self::$_Instance = new View_Smarty();
                 return self::$_Instance;
                 break;
             default:
                 return FALSE;
                 break;
         }
     } else {
         return self::$_Instance;
     }
 }
 /**
  * 单例模式,返回模板实例
  *
  * @return Object
  */
 public static function getInstance()
 {
     if (is_null(self::$_Instance)) {
         switch (TEMPLATE) {
             case 'Smarty':
                 require_once MVC_DIR . '/View/View_Smarty.class.php';
                 self::$_Instance = new View_Smarty();
                 return self::$_Instance;
                 break;
             default:
                 return FALSE;
                 break;
         }
     } else {
         return self::$_Instance;
     }
 }