1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @author @jenschude <[email protected]> |
4
|
|
|
*/ |
5
|
|
|
|
6
|
|
|
namespace Commercetools\Core\Model\Product; |
7
|
|
|
|
8
|
|
|
use Commercetools\Core\Model\Common\JsonObject; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* @package Commercetools\Core\Model\Product |
12
|
|
|
* @method int getFrom() |
13
|
|
|
* @method FacetRange setFrom(int $from = null) |
14
|
|
|
* @method string getFromStr() |
15
|
|
|
* @method FacetRange setFromStr(string $fromStr = null) |
16
|
|
|
* @method int getTo() |
17
|
|
|
* @method FacetRange setTo(int $to = null) |
18
|
|
|
* @method string getToStr() |
19
|
|
|
* @method FacetRange setToStr(string $toStr = null) |
20
|
|
|
* @method int getCount() |
21
|
|
|
* @method FacetRange setCount(int $count = null) |
22
|
|
|
* @method int getTotal() |
23
|
|
|
* @method FacetRange setTotal(int $total = null) |
24
|
|
|
* @method int getMin() |
25
|
|
|
* @method FacetRange setMin(int $min = null) |
26
|
|
|
* @method int getMax() |
27
|
|
|
* @method FacetRange setMax(int $max = null) |
28
|
|
|
* @method int getMean() |
29
|
|
|
* @method FacetRange setMean(int $mean = null) |
30
|
|
|
* @method int getProductCount() |
31
|
|
|
* @method FacetRange setProductCount(int $productCount = null) |
32
|
|
|
*/ |
33
|
|
|
class FacetRange extends JsonObject |
34
|
|
|
{ |
35
|
3 |
|
public function fieldDefinitions() |
36
|
|
|
{ |
37
|
|
|
return [ |
38
|
3 |
|
"from" => [static::TYPE => 'int'], |
39
|
3 |
|
"fromStr" => [static::TYPE => 'string'], |
40
|
3 |
|
"to" => [static::TYPE => 'int'], |
41
|
3 |
|
"toStr" => [static::TYPE => 'string'], |
42
|
3 |
|
"count" => [static::TYPE => 'int'], |
43
|
3 |
|
"total" => [static::TYPE => 'int'], |
44
|
3 |
|
"min" => [static::TYPE => 'int'], |
45
|
3 |
|
"max" => [static::TYPE => 'int'], |
46
|
3 |
|
"mean" => [static::TYPE => 'int'], |
47
|
3 |
|
'productCount' => [static::TYPE => 'int'], |
48
|
|
|
]; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @deprecated use getCount instead - will be removed with version 3.0 |
53
|
|
|
* @return int |
54
|
|
|
*/ |
55
|
|
|
public function getTotalCount() |
56
|
|
|
{ |
57
|
|
|
return $this->getCount(); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @deprecated use setCount instead - will be removed with version 3.0 |
62
|
|
|
* @param int $totalCount |
63
|
|
|
* @return FacetRange |
64
|
|
|
*/ |
65
|
|
|
public function setTotalCount($totalCount = null) |
66
|
|
|
{ |
67
|
|
|
return $this->setCount($totalCount); |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|