commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Product
ProductProjectionPagedSearchResponseModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Product
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
ProductProjectionPagedSearchResponseModel
extends
JsonObjectModel
implements
ProductProjectionPagedSearchResponse
21
{
26
protected
$limit
;
27
32
protected
$offset
;
33
38
protected
$count
;
39
44
protected
$total
;
45
50
protected
$results
;
51
56
protected
$facets
;
57
58
62
public
function
__construct
(
63
?
int
$limit
=
null
,
64
?
int
$offset
=
null
,
65
?
int
$count
=
null
,
66
?
int
$total
=
null
,
67
?
ProductProjectionCollection
$results
=
null
,
68
?
FacetResults
$facets
=
null
69
) {
70
$this->limit =
$limit
;
71
$this->offset =
$offset
;
72
$this->count =
$count
;
73
$this->total =
$total
;
74
$this->results =
$results
;
75
$this->facets =
$facets
;
76
}
77
84
public
function
getLimit
()
85
{
86
if
(is_null($this->limit)) {
88
$data = $this->
raw
(self::FIELD_LIMIT);
89
if
(is_null($data)) {
90
return
null
;
91
}
92
$this->limit = (int) $data;
93
}
94
95
return
$this->limit
;
96
}
97
104
public
function
getOffset
()
105
{
106
if
(is_null($this->offset)) {
108
$data = $this->
raw
(self::FIELD_OFFSET);
109
if
(is_null($data)) {
110
return
null
;
111
}
112
$this->offset = (int) $data;
113
}
114
115
return
$this->offset
;
116
}
117
124
public
function
getCount
()
125
{
126
if
(is_null($this->count)) {
128
$data = $this->
raw
(self::FIELD_COUNT);
129
if
(is_null($data)) {
130
return
null
;
131
}
132
$this->count = (int) $data;
133
}
134
135
return
$this->count
;
136
}
137
144
public
function
getTotal
()
145
{
146
if
(is_null($this->total)) {
148
$data = $this->
raw
(self::FIELD_TOTAL);
149
if
(is_null($data)) {
150
return
null
;
151
}
152
$this->total = (int) $data;
153
}
154
155
return
$this->total
;
156
}
157
165
public
function
getResults
()
166
{
167
if
(is_null($this->results)) {
169
$data = $this->
raw
(self::FIELD_RESULTS);
170
if
(is_null($data)) {
171
return
null
;
172
}
173
$this->results =
ProductProjectionCollection::fromArray
($data);
174
}
175
176
return
$this->results
;
177
}
178
186
public
function
getFacets
()
187
{
188
if
(is_null($this->facets)) {
190
$data = $this->
raw
(self::FIELD_FACETS);
191
if
(is_null($data)) {
192
return
null
;
193
}
194
195
$this->facets =
FacetResultsModel::of
($data);
196
}
197
198
return
$this->facets
;
199
}
200
201
205
public
function
setLimit
(?
int
$limit
): void
206
{
207
$this->limit =
$limit
;
208
}
209
213
public
function
setOffset
(?
int
$offset
): void
214
{
215
$this->offset =
$offset
;
216
}
217
221
public
function
setCount
(?
int
$count
): void
222
{
223
$this->count =
$count
;
224
}
225
229
public
function
setTotal
(?
int
$total
): void
230
{
231
$this->total =
$total
;
232
}
233
237
public
function
setResults
(?
ProductProjectionCollection
$results
): void
238
{
239
$this->results =
$results
;
240
}
241
245
public
function
setFacets
(?
FacetResults
$facets
): void
246
{
247
$this->facets =
$facets
;
248
}
249
}
Commercetools\Api\Models\Product\ProductProjectionCollection
Definition
ProductProjectionCollection.php:22
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel
Definition
ProductProjectionPagedSearchResponseModel.php:21
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\$results
$results
Definition
ProductProjectionPagedSearchResponseModel.php:50
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\getTotal
getTotal()
Definition
ProductProjectionPagedSearchResponseModel.php:144
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\$count
$count
Definition
ProductProjectionPagedSearchResponseModel.php:38
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\$limit
$limit
Definition
ProductProjectionPagedSearchResponseModel.php:26
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\getResults
getResults()
Definition
ProductProjectionPagedSearchResponseModel.php:165
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\getOffset
getOffset()
Definition
ProductProjectionPagedSearchResponseModel.php:104
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\setLimit
setLimit(?int $limit)
Definition
ProductProjectionPagedSearchResponseModel.php:205
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\setResults
setResults(?ProductProjectionCollection $results)
Definition
ProductProjectionPagedSearchResponseModel.php:237
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\__construct
__construct(?int $limit=null, ?int $offset=null, ?int $count=null, ?int $total=null, ?ProductProjectionCollection $results=null, ?FacetResults $facets=null)
Definition
ProductProjectionPagedSearchResponseModel.php:62
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\setOffset
setOffset(?int $offset)
Definition
ProductProjectionPagedSearchResponseModel.php:213
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\getLimit
getLimit()
Definition
ProductProjectionPagedSearchResponseModel.php:84
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\$total
$total
Definition
ProductProjectionPagedSearchResponseModel.php:44
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\getCount
getCount()
Definition
ProductProjectionPagedSearchResponseModel.php:124
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\$facets
$facets
Definition
ProductProjectionPagedSearchResponseModel.php:56
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\getFacets
getFacets()
Definition
ProductProjectionPagedSearchResponseModel.php:186
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\setFacets
setFacets(?FacetResults $facets)
Definition
ProductProjectionPagedSearchResponseModel.php:245
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\$offset
$offset
Definition
ProductProjectionPagedSearchResponseModel.php:32
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\setCount
setCount(?int $count)
Definition
ProductProjectionPagedSearchResponseModel.php:221
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponseModel\setTotal
setTotal(?int $total)
Definition
ProductProjectionPagedSearchResponseModel.php:229
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Product\FacetResults
Definition
FacetResults.php:15
Commercetools\Api\Models\Product\ProductProjectionPagedSearchResponse
Definition
ProductProjectionPagedSearchResponse.php:15
Commercetools\Base\CSequence\fromArray
static fromArray(array $data)
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Product
Definition
AttributeAccessor.php:4
Generated by
1.9.8