commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Search
SearchExactValueModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Search
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
SearchExactValueModel
extends
JsonObjectModel
implements
SearchExactValue
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
62
protected
$caseInsensitive
;
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
213
return
$this->caseInsensitive
;
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
}
Commercetools\Api\Models\Search\SearchExactValueModel
Definition
SearchExactValueModel.php:21
Commercetools\Api\Models\Search\SearchExactValueModel\setValues
setValues(?array $values)
Definition
SearchExactValueModel.php:252
Commercetools\Api\Models\Search\SearchExactValueModel\$boost
$boost
Definition
SearchExactValueModel.php:32
Commercetools\Api\Models\Search\SearchExactValueModel\setLanguage
setLanguage(?string $language)
Definition
SearchExactValueModel.php:260
Commercetools\Api\Models\Search\SearchExactValueModel\getFieldType
getFieldType()
Definition
SearchExactValueModel.php:128
Commercetools\Api\Models\Search\SearchExactValueModel\setFieldType
setFieldType(?string $fieldType)
Definition
SearchExactValueModel.php:236
Commercetools\Api\Models\Search\SearchExactValueModel\$fieldType
$fieldType
Definition
SearchExactValueModel.php:38
Commercetools\Api\Models\Search\SearchExactValueModel\getCaseInsensitive
getCaseInsensitive()
Definition
SearchExactValueModel.php:202
Commercetools\Api\Models\Search\SearchExactValueModel\setCaseInsensitive
setCaseInsensitive(?bool $caseInsensitive)
Definition
SearchExactValueModel.php:268
Commercetools\Api\Models\Search\SearchExactValueModel\__construct
__construct(?string $field=null, ?float $boost=null, ?string $fieldType=null, $value=null, ?array $values=null, ?string $language=null, ?bool $caseInsensitive=null)
Definition
SearchExactValueModel.php:68
Commercetools\Api\Models\Search\SearchExactValueModel\getValues
getValues()
Definition
SearchExactValueModel.php:164
Commercetools\Api\Models\Search\SearchExactValueModel\$value
$value
Definition
SearchExactValueModel.php:44
Commercetools\Api\Models\Search\SearchExactValueModel\setValue
setValue($value)
Definition
SearchExactValueModel.php:244
Commercetools\Api\Models\Search\SearchExactValueModel\setField
setField(?string $field)
Definition
SearchExactValueModel.php:220
Commercetools\Api\Models\Search\SearchExactValueModel\getLanguage
getLanguage()
Definition
SearchExactValueModel.php:184
Commercetools\Api\Models\Search\SearchExactValueModel\getBoost
getBoost()
Definition
SearchExactValueModel.php:108
Commercetools\Api\Models\Search\SearchExactValueModel\$values
$values
Definition
SearchExactValueModel.php:50
Commercetools\Api\Models\Search\SearchExactValueModel\getValue
getValue()
Definition
SearchExactValueModel.php:146
Commercetools\Api\Models\Search\SearchExactValueModel\$caseInsensitive
$caseInsensitive
Definition
SearchExactValueModel.php:62
Commercetools\Api\Models\Search\SearchExactValueModel\$language
$language
Definition
SearchExactValueModel.php:56
Commercetools\Api\Models\Search\SearchExactValueModel\setBoost
setBoost(?float $boost)
Definition
SearchExactValueModel.php:228
Commercetools\Api\Models\Search\SearchExactValueModel\getField
getField()
Definition
SearchExactValueModel.php:90
Commercetools\Api\Models\Search\SearchExactValueModel\$field
$field
Definition
SearchExactValueModel.php:26
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Search\SearchExactValue
Definition
SearchExactValue.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Search
Definition
SearchAndExpression.php:9
Generated by
1.9.8