commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SearchExactValueModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $field;
27
32 protected $boost;
33
38 protected $fieldType;
39
44 protected $value;
45
50 protected $values;
51
56 protected $language;
57
63
64
68 public function __construct(
69 ?string $field = null,
70 ?float $boost = null,
71 ?string $fieldType = null,
72 $value = null,
73 ?array $values = null,
74 ?string $language = null,
75 ?bool $caseInsensitive = null
76 ) {
77 $this->field = $field;
78 $this->boost = $boost;
79 $this->fieldType = $fieldType;
80 $this->value = $value;
81 $this->values = $values;
82 $this->language = $language;
83 $this->caseInsensitive = $caseInsensitive;
84 }
85
90 public function getField()
91 {
92 if (is_null($this->field)) {
94 $data = $this->raw(self::FIELD_FIELD);
95 if (is_null($data)) {
96 return null;
97 }
98 $this->field = (string) $data;
99 }
100
101 return $this->field;
102 }
103
108 public function getBoost()
109 {
110 if (is_null($this->boost)) {
112 $data = $this->raw(self::FIELD_BOOST);
113 if (is_null($data)) {
114 return null;
115 }
116 $this->boost = (float) $data;
117 }
118
119 return $this->boost;
120 }
121
128 public function getFieldType()
129 {
130 if (is_null($this->fieldType)) {
132 $data = $this->raw(self::FIELD_FIELD_TYPE);
133 if (is_null($data)) {
134 return null;
135 }
136 $this->fieldType = (string) $data;
137 }
138
139 return $this->fieldType;
140 }
141
146 public function getValue()
147 {
148 if (is_null($this->value)) {
150 $data = $this->raw(self::FIELD_VALUE);
151 if (is_null($data)) {
152 return null;
153 }
154 $this->value = $data;
155 }
156
157 return $this->value;
158 }
159
164 public function getValues()
165 {
166 if (is_null($this->values)) {
168 $data = $this->raw(self::FIELD_VALUES);
169 if (is_null($data)) {
170 return null;
171 }
172 $this->values = $data;
173 }
174
175 return $this->values;
176 }
177
184 public function getLanguage()
185 {
186 if (is_null($this->language)) {
188 $data = $this->raw(self::FIELD_LANGUAGE);
189 if (is_null($data)) {
190 return null;
191 }
192 $this->language = (string) $data;
193 }
194
195 return $this->language;
196 }
197
202 public function getCaseInsensitive()
203 {
204 if (is_null($this->caseInsensitive)) {
206 $data = $this->raw(self::FIELD_CASE_INSENSITIVE);
207 if (is_null($data)) {
208 return null;
209 }
210 $this->caseInsensitive = (bool) $data;
211 }
212
214 }
215
216
220 public function setField(?string $field): void
221 {
222 $this->field = $field;
223 }
224
228 public function setBoost(?float $boost): void
229 {
230 $this->boost = $boost;
231 }
232
236 public function setFieldType(?string $fieldType): void
237 {
238 $this->fieldType = $fieldType;
239 }
240
244 public function setValue($value): void
245 {
246 $this->value = $value;
247 }
248
252 public function setValues(?array $values): void
253 {
254 $this->values = $values;
255 }
256
260 public function setLanguage(?string $language): void
261 {
262 $this->language = $language;
263 }
264
268 public function setCaseInsensitive(?bool $caseInsensitive): void
269 {
270 $this->caseInsensitive = $caseInsensitive;
271 }
272}
__construct(?string $field=null, ?float $boost=null, ?string $fieldType=null, $value=null, ?array $values=null, ?string $language=null, ?bool $caseInsensitive=null)