commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Search
SearchQueryExpressionValueModel.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
SearchQueryExpressionValueModel
extends
JsonObjectModel
implements
SearchQueryExpressionValue
21
{
26
protected
$field
;
27
32
protected
$boost
;
33
38
protected
$fieldType
;
39
40
44
public
function
__construct
(
45
?
string
$field
=
null
,
46
?
float
$boost
=
null
,
47
?
string
$fieldType
=
null
48
) {
49
$this->field =
$field
;
50
$this->boost =
$boost
;
51
$this->fieldType =
$fieldType
;
52
}
53
58
public
function
getField
()
59
{
60
if
(is_null($this->field)) {
62
$data = $this->
raw
(self::FIELD_FIELD);
63
if
(is_null($data)) {
64
return
null
;
65
}
66
$this->field = (string) $data;
67
}
68
69
return
$this->field
;
70
}
71
76
public
function
getBoost
()
77
{
78
if
(is_null($this->boost)) {
80
$data = $this->
raw
(self::FIELD_BOOST);
81
if
(is_null($data)) {
82
return
null
;
83
}
84
$this->boost = (float) $data;
85
}
86
87
return
$this->boost
;
88
}
89
96
public
function
getFieldType
()
97
{
98
if
(is_null($this->fieldType)) {
100
$data = $this->
raw
(self::FIELD_FIELD_TYPE);
101
if
(is_null($data)) {
102
return
null
;
103
}
104
$this->fieldType = (string) $data;
105
}
106
107
return
$this->fieldType
;
108
}
109
110
114
public
function
setField
(?
string
$field
): void
115
{
116
$this->field =
$field
;
117
}
118
122
public
function
setBoost
(?
float
$boost
): void
123
{
124
$this->boost =
$boost
;
125
}
126
130
public
function
setFieldType
(?
string
$fieldType
): void
131
{
132
$this->fieldType =
$fieldType
;
133
}
134
}
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel
Definition:
SearchQueryExpressionValueModel.php:21
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\setField
setField(?string $field)
Definition:
SearchQueryExpressionValueModel.php:114
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\setBoost
setBoost(?float $boost)
Definition:
SearchQueryExpressionValueModel.php:122
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\$boost
$boost
Definition:
SearchQueryExpressionValueModel.php:32
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\getFieldType
getFieldType()
Definition:
SearchQueryExpressionValueModel.php:96
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\$field
$field
Definition:
SearchQueryExpressionValueModel.php:26
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\$fieldType
$fieldType
Definition:
SearchQueryExpressionValueModel.php:38
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\setFieldType
setFieldType(?string $fieldType)
Definition:
SearchQueryExpressionValueModel.php:130
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\getField
getField()
Definition:
SearchQueryExpressionValueModel.php:58
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\getBoost
getBoost()
Definition:
SearchQueryExpressionValueModel.php:76
Commercetools\Api\Models\Search\SearchQueryExpressionValueModel\__construct
__construct(?string $field=null, ?float $boost=null, ?string $fieldType=null)
Definition:
SearchQueryExpressionValueModel.php:44
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\SearchQueryExpressionValue
Definition:
SearchQueryExpressionValue.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Search
Definition:
SearchAndExpression.php:9
Generated by
1.9.1