commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
AttributeGroupPagedQueryResponseModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use 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 
97  public function getOffset()
98  {
99  if (is_null($this->offset)) {
101  $data = $this->raw(self::FIELD_OFFSET);
102  if (is_null($data)) {
103  return null;
104  }
105  $this->offset = (int) $data;
106  }
107 
108  return $this->offset;
109  }
110 
117  public function getCount()
118  {
119  if (is_null($this->count)) {
121  $data = $this->raw(self::FIELD_COUNT);
122  if (is_null($data)) {
123  return null;
124  }
125  $this->count = (int) $data;
126  }
127 
128  return $this->count;
129  }
130 
141  public function getTotal()
142  {
143  if (is_null($this->total)) {
145  $data = $this->raw(self::FIELD_TOTAL);
146  if (is_null($data)) {
147  return null;
148  }
149  $this->total = (int) $data;
150  }
151 
152  return $this->total;
153  }
154 
161  public function getResults()
162  {
163  if (is_null($this->results)) {
165  $data = $this->raw(self::FIELD_RESULTS);
166  if (is_null($data)) {
167  return null;
168  }
169  $this->results = AttributeGroupCollection::fromArray($data);
170  }
171 
172  return $this->results;
173  }
174 
175 
179  public function setLimit(?int $limit): void
180  {
181  $this->limit = $limit;
182  }
183 
187  public function setOffset(?int $offset): void
188  {
189  $this->offset = $offset;
190  }
191 
195  public function setCount(?int $count): void
196  {
197  $this->count = $count;
198  }
199 
203  public function setTotal(?int $total): void
204  {
205  $this->total = $total;
206  }
207 
212  {
213  $this->results = $results;
214  }
215 }
__construct(?int $limit=null, ?int $offset=null, ?int $count=null, ?int $total=null, ?AttributeGroupCollection $results=null)