Ejemplo n.º 1
0
 public static function getInstance(TPL &$tpl = null)
 {
     //判断self::$instance 是否已经被实例化
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
 public static function getInstance(TPL &$tpl = null)
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
         self::$instance->tpl = $tpl;
     }
     return self::$instance;
 }