single instance

This commit is contained in:
Jaeger 2017-12-15 11:05:32 +08:00
parent 03e6a955bf
commit 1d73895981

View File

@ -40,7 +40,7 @@ class QueryList
{ {
protected $query; protected $query;
protected $kernel; protected $kernel;
protected static $plugins = []; protected static $instance = null;
/** /**
* QueryList constructor. * QueryList constructor.
@ -74,14 +74,14 @@ class QueryList
} }
/** /**
* Get the QueryList instance * Get the QueryList single instance
* *
* @return QueryList * @return QueryList
*/ */
public static function getInstance() public static function getInstance()
{ {
$instance = new self(); self::$instance || self::$instance = new self();
return $instance; return self::$instance;
} }
/** /**