Example #1
0
 public static function getContext()
 {
     if (!isset(self::$context)) {
         self::$context = new Context();
     }
     return self::$context;
 }
Example #2
0
 /**
  * 获取实例。
  */
 static function getInstance()
 {
     if (self::$context == null) {
         self::$context = new Context();
     }
     return self::$context;
 }