commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
McpServerPagedQueryResponseModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $limit;
27
32 protected $offset;
33
38 protected $count;
39
44 protected $total;
45
50 protected $results;
51
52
56 public function __construct(
57 ?int $limit = null,
58 ?int $offset = null,
59 ?int $count = null,
60 ?int $total = null,
62 ) {
63 $this->limit = $limit;
64 $this->offset = $offset;
65 $this->count = $count;
66 $this->total = $total;
67 $this->results = $results;
68 }
69
76 public function getLimit()
77 {
78 if (is_null($this->limit)) {
80 $data = $this->raw(self::FIELD_LIMIT);
81 if (is_null($data)) {
82 return null;
83 }
84 $this->limit = (int) $data;
85 }
86
87 return $this->limit;
88 }
89
96 public function getOffset()
97 {
98 if (is_null($this->offset)) {
100 $data = $this->raw(self::FIELD_OFFSET);
101 if (is_null($data)) {
102 return null;
103 }
104 $this->offset = (int) $data;
105 }
106
107 return $this->offset;
108 }
109
116 public function getCount()
117 {
118 if (is_null($this->count)) {
120 $data = $this->raw(self::FIELD_COUNT);
121 if (is_null($data)) {
122 return null;
123 }
124 $this->count = (int) $data;
125 }
126
127 return $this->count;
128 }
129
138 public function getTotal()
139 {
140 if (is_null($this->total)) {
142 $data = $this->raw(self::FIELD_TOTAL);
143 if (is_null($data)) {
144 return null;
145 }
146 $this->total = (int) $data;
147 }
148
149 return $this->total;
150 }
151
158 public function getResults()
159 {
160 if (is_null($this->results)) {
162 $data = $this->raw(self::FIELD_RESULTS);
163 if (is_null($data)) {
164 return null;
165 }
166 $this->results = McpServerCollection::fromArray($data);
167 }
168
169 return $this->results;
170 }
171
172
176 public function setLimit(?int $limit): void
177 {
178 $this->limit = $limit;
179 }
180
184 public function setOffset(?int $offset): void
185 {
186 $this->offset = $offset;
187 }
188
192 public function setCount(?int $count): void
193 {
194 $this->count = $count;
195 }
196
200 public function setTotal(?int $total): void
201 {
202 $this->total = $total;
203 }
204
209 {
210 $this->results = $results;
211 }
212}
__construct(?int $limit=null, ?int $offset=null, ?int $count=null, ?int $total=null, ?McpServerCollection $results=null)
static fromArray(array $data)