commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Common
PagedQueryResponseBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Common
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
PagedQueryResponseBuilder
implements
Builder
22
{
27
private
$limit;
28
33
private
$offset;
34
39
private
$count;
40
45
private
$total;
46
51
private
$results;
52
57
private
$meta;
58
65
public
function
getLimit
()
66
{
67
return
$this->limit;
68
}
69
76
public
function
getOffset
()
77
{
78
return
$this->offset;
79
}
80
87
public
function
getCount
()
88
{
89
return
$this->count;
90
}
91
102
public
function
getTotal
()
103
{
104
return
$this->total;
105
}
106
111
public
function
getResults
()
112
{
113
return
$this->results;
114
}
115
120
public
function
getMeta
()
121
{
122
return
$this->meta;
123
}
124
129
public
function
withLimit
(?
int
$limit)
130
{
131
$this->limit = $limit;
132
133
return
$this;
134
}
135
140
public
function
withOffset
(?
int
$offset)
141
{
142
$this->offset = $offset;
143
144
return
$this;
145
}
146
151
public
function
withCount
(?
int
$count)
152
{
153
$this->count = $count;
154
155
return
$this;
156
}
157
162
public
function
withTotal
(?
int
$total)
163
{
164
$this->total = $total;
165
166
return
$this;
167
}
168
173
public
function
withResults
(?
BaseResourceCollection
$results)
174
{
175
$this->results = $results;
176
177
return
$this;
178
}
179
184
public
function
withMeta
(?
JsonObject
$meta)
185
{
186
$this->meta = $meta;
187
188
return
$this;
189
}
190
191
192
public
function
build
():
PagedQueryResponse
193
{
194
return
new
PagedQueryResponseModel
(
195
$this->limit,
196
$this->offset,
197
$this->count,
198
$this->total,
199
$this->results,
200
$this->meta
201
);
202
}
203
204
public
static
function
of
():
PagedQueryResponseBuilder
205
{
206
return
new
self
();
207
}
208
}
Commercetools\Api\Models\Common\BaseResourceCollection
Definition:
BaseResourceCollection.php:26
Commercetools\Api\Models\Common\PagedQueryResponseBuilder
Definition:
PagedQueryResponseBuilder.php:22
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\getResults
getResults()
Definition:
PagedQueryResponseBuilder.php:111
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\build
build()
Definition:
PagedQueryResponseBuilder.php:192
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\withTotal
withTotal(?int $total)
Definition:
PagedQueryResponseBuilder.php:162
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\withLimit
withLimit(?int $limit)
Definition:
PagedQueryResponseBuilder.php:129
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\getOffset
getOffset()
Definition:
PagedQueryResponseBuilder.php:76
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\getCount
getCount()
Definition:
PagedQueryResponseBuilder.php:87
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\withMeta
withMeta(?JsonObject $meta)
Definition:
PagedQueryResponseBuilder.php:184
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\withOffset
withOffset(?int $offset)
Definition:
PagedQueryResponseBuilder.php:140
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\getLimit
getLimit()
Definition:
PagedQueryResponseBuilder.php:65
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\getTotal
getTotal()
Definition:
PagedQueryResponseBuilder.php:102
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\withCount
withCount(?int $count)
Definition:
PagedQueryResponseBuilder.php:151
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\withResults
withResults(?BaseResourceCollection $results)
Definition:
PagedQueryResponseBuilder.php:173
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\of
static of()
Definition:
PagedQueryResponseBuilder.php:204
Commercetools\Api\Models\Common\PagedQueryResponseBuilder\getMeta
getMeta()
Definition:
PagedQueryResponseBuilder.php:120
Commercetools\Api\Models\Common\PagedQueryResponseModel
Definition:
PagedQueryResponseModel.php:21
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Common\PagedQueryResponse
Definition:
PagedQueryResponse.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Common
Definition:
Address.php:9
Generated by
1.9.1