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