class Database{ static protected $db; private function __construct(){ } static function getInstance(){ echo 111; if(self::$db){ return self::$db; }else{ self::$db = new self(); return self::$db; } } function where($where){ return $this; } function order($order){ return $this; } function limit($limit){ return $this; } }
是单粒不是单利