/** * 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; }
public static function getInstance() { if (!self::$instance) { self::$instance = new HttpServer(); } return self::$instance; }
public static function getInstance($webPath, $config = 'default') { if (!self::$instance) { self::$instance = new HttpServer($webPath, $config); } return self::$instance; }