commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
z
Variables
$
a
d
e
f
g
o
r
s
t
u
•
All
Classes
Namespaces
Functions
Variables
Pages
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Common
PagedQueryResponseModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Common
;
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
PagedQueryResponseModel
extends
JsonObjectModel
implements
PagedQueryResponse
21
{
26
protected
$limit
;
27
32
protected
$offset
;
33
38
protected
$count
;
39
44
protected
$total
;
45
50
protected
$results
;
51
56
protected
$meta
;
57
58
62
public
function
__construct
(
63
?
int
$limit
=
null
,
64
?
int
$offset
=
null
,
65
?
int
$count
=
null
,
66
?
int
$total
=
null
,
67
?
BaseResourceCollection
$results
=
null
,
68
?
JsonObject
$meta
=
null
69
) {
70
$this->limit =
$limit
;
71
$this->offset =
$offset
;
72
$this->count =
$count
;
73
$this->total =
$total
;
74
$this->results =
$results
;
75
$this->meta =
$meta
;
76
}
62
public
function
__construct
( {
…
}
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
}
84
public
function
getLimit
() {
…
}
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
}
104
public
function
getOffset
() {
…
}
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
}
124
public
function
getCount
() {
…
}
137
148
public
function
getTotal
()
149
{
150
if
(is_null($this->total)) {
152
$data = $this->
raw
(self::FIELD_TOTAL);
153
if
(is_null($data)) {
154
return
null
;
155
}
156
$this->total = (int) $data;
157
}
158
159
return
$this->total
;
160
}
148
public
function
getTotal
() {
…
}
161
169
public
function
getResults
()
170
{
171
if
(is_null($this->results)) {
173
$data = $this->
raw
(self::FIELD_RESULTS);
174
if
(is_null($data)) {
175
return
null
;
176
}
177
$this->results =
BaseResourceCollection::fromArray
($data);
178
}
179
180
return
$this->results
;
181
}
169
public
function
getResults
() {
…
}
182
189
public
function
getMeta
()
190
{
191
if
(is_null($this->meta)) {
193
$data = $this->
raw
(self::FIELD_META);
194
if
(is_null($data)) {
195
return
null
;
196
}
197
$this->meta = JsonObjectModel::of($data);
198
}
199
200
return
$this->meta
;
201
}
189
public
function
getMeta
() {
…
}
202
203
207
public
function
setLimit
(?
int
$limit
): void
208
{
209
$this->limit =
$limit
;
210
}
207
public
function
setLimit
(?
int
$limit
): void {
…
}
211
215
public
function
setOffset
(?
int
$offset
): void
216
{
217
$this->offset =
$offset
;
218
}
215
public
function
setOffset
(?
int
$offset
): void {
…
}
219
223
public
function
setCount
(?
int
$count
): void
224
{
225
$this->count =
$count
;
226
}
223
public
function
setCount
(?
int
$count
): void {
…
}
227
231
public
function
setTotal
(?
int
$total
): void
232
{
233
$this->total =
$total
;
234
}
231
public
function
setTotal
(?
int
$total
): void {
…
}
235
239
public
function
setResults
(?
BaseResourceCollection
$results
): void
240
{
241
$this->results =
$results
;
242
}
239
public
function
setResults
(?
BaseResourceCollection
$results
): void {
…
}
243
247
public
function
setMeta
(?
JsonObject
$meta
): void
248
{
249
$this->meta =
$meta
;
250
}
247
public
function
setMeta
(?
JsonObject
$meta
): void {
…
}
251
}
20
final
class
PagedQueryResponseModel
extends
JsonObjectModel
implements
PagedQueryResponse
{
…
};
Commercetools\Api\Models\Common\BaseResourceCollection
Definition
BaseResourceCollection.php:26
Commercetools\Api\Models\Common\PagedQueryResponseModel
Definition
PagedQueryResponseModel.php:21
Commercetools\Api\Models\Common\PagedQueryResponseModel\getResults
getResults()
Definition
PagedQueryResponseModel.php:169
Commercetools\Api\Models\Common\PagedQueryResponseModel\setMeta
setMeta(?JsonObject $meta)
Definition
PagedQueryResponseModel.php:247
Commercetools\Api\Models\Common\PagedQueryResponseModel\getCount
getCount()
Definition
PagedQueryResponseModel.php:124
Commercetools\Api\Models\Common\PagedQueryResponseModel\getLimit
getLimit()
Definition
PagedQueryResponseModel.php:84
Commercetools\Api\Models\Common\PagedQueryResponseModel\setOffset
setOffset(?int $offset)
Definition
PagedQueryResponseModel.php:215
Commercetools\Api\Models\Common\PagedQueryResponseModel\setLimit
setLimit(?int $limit)
Definition
PagedQueryResponseModel.php:207
Commercetools\Api\Models\Common\PagedQueryResponseModel\__construct
__construct(?int $limit=null, ?int $offset=null, ?int $count=null, ?int $total=null, ?BaseResourceCollection $results=null, ?JsonObject $meta=null)
Definition
PagedQueryResponseModel.php:62
Commercetools\Api\Models\Common\PagedQueryResponseModel\setCount
setCount(?int $count)
Definition
PagedQueryResponseModel.php:223
Commercetools\Api\Models\Common\PagedQueryResponseModel\$limit
$limit
Definition
PagedQueryResponseModel.php:26
Commercetools\Api\Models\Common\PagedQueryResponseModel\getOffset
getOffset()
Definition
PagedQueryResponseModel.php:104
Commercetools\Api\Models\Common\PagedQueryResponseModel\$meta
$meta
Definition
PagedQueryResponseModel.php:56
Commercetools\Api\Models\Common\PagedQueryResponseModel\getTotal
getTotal()
Definition
PagedQueryResponseModel.php:148
Commercetools\Api\Models\Common\PagedQueryResponseModel\$total
$total
Definition
PagedQueryResponseModel.php:44
Commercetools\Api\Models\Common\PagedQueryResponseModel\$results
$results
Definition
PagedQueryResponseModel.php:50
Commercetools\Api\Models\Common\PagedQueryResponseModel\$count
$count
Definition
PagedQueryResponseModel.php:38
Commercetools\Api\Models\Common\PagedQueryResponseModel\setResults
setResults(?BaseResourceCollection $results)
Definition
PagedQueryResponseModel.php:239
Commercetools\Api\Models\Common\PagedQueryResponseModel\setTotal
setTotal(?int $total)
Definition
PagedQueryResponseModel.php:231
Commercetools\Api\Models\Common\PagedQueryResponseModel\$offset
$offset
Definition
PagedQueryResponseModel.php:32
Commercetools\Api\Models\Common\PagedQueryResponseModel\getMeta
getMeta()
Definition
PagedQueryResponseModel.php:189
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
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\CSequence\fromArray
static fromArray(array $data)
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Common
Definition
Address.php:9
Generated by
1.9.8