commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SearchQueryExpressionValueModel.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
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}
__construct(?string $field=null, ?float $boost=null, ?string $fieldType=null)