Skip to content

Commit 1b981ea

Browse files
committed
Add fluent setter
1 parent e4a517f commit 1b981ea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Query/SelectQuery.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,21 @@ public function getGroup(): ?array
100100
return $this->group;
101101
}
102102

103+
/**
104+
* Set whether results of this query should be saved in the model registry
105+
*
106+
* @param bool $saveResults
107+
* @return $this
108+
*/
109+
public function saveResults(bool $saveResults = true): static
110+
{
111+
$this->saveResults = $saveResults;
112+
return $this;
113+
}
114+
103115
/**
104116
* Whether results of this query should be saved in the model registry
117+
*
105118
* @return bool
106119
*/
107120
public function shouldSaveResults(): bool

0 commit comments

Comments
 (0)