commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
OrderPagedSearchResponseModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $total;
27
32 protected $offset;
33
38 protected $limit;
39
44 protected $hits;
45
46
50 public function __construct(
51 ?int $total = null,
52 ?int $offset = null,
53 ?int $limit = null,
54 ?HitCollection $hits = null
55 ) {
56 $this->total = $total;
57 $this->offset = $offset;
58 $this->limit = $limit;
59 $this->hits = $hits;
60 }
61
68 public function getTotal()
69 {
70 if (is_null($this->total)) {
72 $data = $this->raw(self::FIELD_TOTAL);
73 if (is_null($data)) {
74 return null;
75 }
76 $this->total = (int) $data;
77 }
78
79 return $this->total;
80 }
81
88 public function getOffset()
89 {
90 if (is_null($this->offset)) {
92 $data = $this->raw(self::FIELD_OFFSET);
93 if (is_null($data)) {
94 return null;
95 }
96 $this->offset = (int) $data;
97 }
98
99 return $this->offset;
100 }
101
108 public function getLimit()
109 {
110 if (is_null($this->limit)) {
112 $data = $this->raw(self::FIELD_LIMIT);
113 if (is_null($data)) {
114 return null;
115 }
116 $this->limit = (int) $data;
117 }
118
119 return $this->limit;
120 }
121
128 public function getHits()
129 {
130 if (is_null($this->hits)) {
132 $data = $this->raw(self::FIELD_HITS);
133 if (is_null($data)) {
134 return null;
135 }
136 $this->hits = HitCollection::fromArray($data);
137 }
138
139 return $this->hits;
140 }
141
142
146 public function setTotal(?int $total): void
147 {
148 $this->total = $total;
149 }
150
154 public function setOffset(?int $offset): void
155 {
156 $this->offset = $offset;
157 }
158
162 public function setLimit(?int $limit): void
163 {
164 $this->limit = $limit;
165 }
166
170 public function setHits(?HitCollection $hits): void
171 {
172 $this->hits = $hits;
173 }
174}
__construct(?int $total=null, ?int $offset=null, ?int $limit=null, ?HitCollection $hits=null)
static fromArray(array $data)