From 2e258c7e08c2304486c55605a6e109ac07dd8300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sun, 16 Apr 2023 15:34:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SqlBuilder.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SqlBuilder.php b/SqlBuilder.php index d5a74dc..6e1219d 100644 --- a/SqlBuilder.php +++ b/SqlBuilder.php @@ -24,6 +24,14 @@ class SqlBuilder extends Component public ActiveQuery|Query|null $query; + public function __construct(ActiveQuery|Query|null $config) + { + parent::__construct(); + + $this->query = $config; + } + + /** * @param ISqlBuilder|null $query * @return $this @@ -31,7 +39,7 @@ class SqlBuilder extends Component */ public static function builder(ISqlBuilder|null $query): static { - return new static(['query' => $query]); + return new static($query); }