commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
All Classes Namespaces Functions Variables Pages
FacetRangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class FacetRangeBuilder implements Builder
22{
27 private $from;
28
33 private $fromStr;
34
39 private $to;
40
45 private $toStr;
46
51 private $count;
52
57 private $productCount;
58
63 private $total;
64
69 private $min;
70
75 private $max;
76
81 private $mean;
82
90 public function getFrom()
91 {
92 return $this->from;
93 }
94
102 public function getFromStr()
103 {
104 return $this->fromStr;
105 }
106
114 public function getTo()
115 {
116 return $this->to;
117 }
118
126 public function getToStr()
127 {
128 return $this->toStr;
129 }
130
137 public function getCount()
138 {
139 return $this->count;
140 }
141
149 public function getProductCount()
150 {
151 return $this->productCount;
152 }
153
160 public function getTotal()
161 {
162 return $this->total;
163 }
164
171 public function getMin()
172 {
173 return $this->min;
174 }
175
182 public function getMax()
183 {
184 return $this->max;
185 }
186
193 public function getMean()
194 {
195 return $this->mean;
196 }
197
202 public function withFrom(?float $from)
203 {
204 $this->from = $from;
205
206 return $this;
207 }
208
213 public function withFromStr(?string $fromStr)
214 {
215 $this->fromStr = $fromStr;
216
217 return $this;
218 }
219
224 public function withTo(?float $to)
225 {
226 $this->to = $to;
227
228 return $this;
229 }
230
235 public function withToStr(?string $toStr)
236 {
237 $this->toStr = $toStr;
238
239 return $this;
240 }
241
246 public function withCount(?int $count)
247 {
248 $this->count = $count;
249
250 return $this;
251 }
252
257 public function withProductCount(?int $productCount)
258 {
259 $this->productCount = $productCount;
260
261 return $this;
262 }
263
268 public function withTotal(?float $total)
269 {
270 $this->total = $total;
271
272 return $this;
273 }
274
279 public function withMin(?float $min)
280 {
281 $this->min = $min;
282
283 return $this;
284 }
285
290 public function withMax(?float $max)
291 {
292 $this->max = $max;
293
294 return $this;
295 }
296
301 public function withMean(?float $mean)
302 {
303 $this->mean = $mean;
304
305 return $this;
306 }
307
308
309 public function build(): FacetRange
310 {
311 return new FacetRangeModel(
312 $this->from,
313 $this->fromStr,
314 $this->to,
315 $this->toStr,
316 $this->count,
317 $this->productCount,
318 $this->total,
319 $this->min,
320 $this->max,
321 $this->mean
322 );
323 }
324
325 public static function of(): FacetRangeBuilder
326 {
327 return new self();
328 }
329}