Пример #1
0
 /**
  * Method  getInstance
  * @desc   获取对象
  * @author WenJun <*****@*****.**>
  * @static
  * @return HttpServer|null
  */
 public static function getInstance()
 {
     if (empty(self::$instance) || !self::$instance instanceof HttpServer) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Пример #2
0
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new HttpServer();
     }
     return self::$instance;
 }
Пример #3
0
 public static function getInstance($webPath, $config = 'default')
 {
     if (!self::$instance) {
         self::$instance = new HttpServer($webPath, $config);
     }
     return self::$instance;
 }