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
SearchSortingModel.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
SearchSortingModel
extends
JsonObjectModel
implements
SearchSorting
21
{
26
protected
$field
;
27
32
protected
$language
;
33
38
protected
$order
;
39
44
protected
$mode
;
45
50
protected
$fieldType
;
51
56
protected
$filter
;
57
58
62
public
function
__construct
(
63
?
string
$field
=
null
,
64
?
string
$language
=
null
,
65
?
string
$order
=
null
,
66
?
string
$mode
=
null
,
67
?
string
$fieldType
=
null
,
68
?
SearchQueryExpression
$filter
=
null
69
) {
70
$this->field =
$field
;
71
$this->language =
$language
;
72
$this->order =
$order
;
73
$this->mode =
$mode
;
74
$this->fieldType =
$fieldType
;
75
$this->filter =
$filter
;
76
}
77
84
public
function
getField
()
85
{
86
if
(is_null($this->field)) {
88
$data = $this->
raw
(self::FIELD_FIELD);
89
if
(is_null($data)) {
90
return
null
;
91
}
92
$this->field = (string) $data;
93
}
94
95
return
$this->field
;
96
}
97
104
public
function
getLanguage
()
105
{
106
if
(is_null($this->language)) {
108
$data = $this->
raw
(self::FIELD_LANGUAGE);
109
if
(is_null($data)) {
110
return
null
;
111
}
112
$this->language = (string) $data;
113
}
114
115
return
$this->language
;
116
}
117
125
public
function
getOrder
()
126
{
127
if
(is_null($this->order)) {
129
$data = $this->
raw
(self::FIELD_ORDER);
130
if
(is_null($data)) {
131
return
null
;
132
}
133
$this->order = (string) $data;
134
}
135
136
return
$this->order
;
137
}
138
145
public
function
getMode
()
146
{
147
if
(is_null($this->mode)) {
149
$data = $this->
raw
(self::FIELD_MODE);
150
if
(is_null($data)) {
151
return
null
;
152
}
153
$this->mode = (string) $data;
154
}
155
156
return
$this->mode
;
157
}
158
165
public
function
getFieldType
()
166
{
167
if
(is_null($this->fieldType)) {
169
$data = $this->
raw
(self::FIELD_FIELD_TYPE);
170
if
(is_null($data)) {
171
return
null
;
172
}
173
$this->fieldType = (string) $data;
174
}
175
176
return
$this->fieldType
;
177
}
178
185
public
function
getFilter
()
186
{
187
if
(is_null($this->filter)) {
189
$data = $this->
raw
(self::FIELD_FILTER);
190
if
(is_null($data)) {
191
return
null
;
192
}
193
194
$this->filter =
SearchQueryExpressionModel::of
($data);
195
}
196
197
return
$this->filter
;
198
}
199
200
204
public
function
setField
(?
string
$field
): void
205
{
206
$this->field =
$field
;
207
}
208
212
public
function
setLanguage
(?
string
$language
): void
213
{
214
$this->language =
$language
;
215
}
216
220
public
function
setOrder
(?
string
$order
): void
221
{
222
$this->order =
$order
;
223
}
224
228
public
function
setMode
(?
string
$mode
): void
229
{
230
$this->mode =
$mode
;
231
}
232
236
public
function
setFieldType
(?
string
$fieldType
): void
237
{
238
$this->fieldType =
$fieldType
;
239
}
240
244
public
function
setFilter
(?
SearchQueryExpression
$filter
): void
245
{
246
$this->filter =
$filter
;
247
}
248
}
Commercetools\Api\Models\Search\SearchSortingModel
Definition
SearchSortingModel.php:21
Commercetools\Api\Models\Search\SearchSortingModel\setOrder
setOrder(?string $order)
Definition
SearchSortingModel.php:220
Commercetools\Api\Models\Search\SearchSortingModel\getFieldType
getFieldType()
Definition
SearchSortingModel.php:165
Commercetools\Api\Models\Search\SearchSortingModel\setMode
setMode(?string $mode)
Definition
SearchSortingModel.php:228
Commercetools\Api\Models\Search\SearchSortingModel\setField
setField(?string $field)
Definition
SearchSortingModel.php:204
Commercetools\Api\Models\Search\SearchSortingModel\getField
getField()
Definition
SearchSortingModel.php:84
Commercetools\Api\Models\Search\SearchSortingModel\$fieldType
$fieldType
Definition
SearchSortingModel.php:50
Commercetools\Api\Models\Search\SearchSortingModel\$order
$order
Definition
SearchSortingModel.php:38
Commercetools\Api\Models\Search\SearchSortingModel\$field
$field
Definition
SearchSortingModel.php:26
Commercetools\Api\Models\Search\SearchSortingModel\__construct
__construct(?string $field=null, ?string $language=null, ?string $order=null, ?string $mode=null, ?string $fieldType=null, ?SearchQueryExpression $filter=null)
Definition
SearchSortingModel.php:62
Commercetools\Api\Models\Search\SearchSortingModel\$mode
$mode
Definition
SearchSortingModel.php:44
Commercetools\Api\Models\Search\SearchSortingModel\getFilter
getFilter()
Definition
SearchSortingModel.php:185
Commercetools\Api\Models\Search\SearchSortingModel\getLanguage
getLanguage()
Definition
SearchSortingModel.php:104
Commercetools\Api\Models\Search\SearchSortingModel\getOrder
getOrder()
Definition
SearchSortingModel.php:125
Commercetools\Api\Models\Search\SearchSortingModel\setLanguage
setLanguage(?string $language)
Definition
SearchSortingModel.php:212
Commercetools\Api\Models\Search\SearchSortingModel\setFieldType
setFieldType(?string $fieldType)
Definition
SearchSortingModel.php:236
Commercetools\Api\Models\Search\SearchSortingModel\getMode
getMode()
Definition
SearchSortingModel.php:145
Commercetools\Api\Models\Search\SearchSortingModel\$language
$language
Definition
SearchSortingModel.php:32
Commercetools\Api\Models\Search\SearchSortingModel\setFilter
setFilter(?SearchQueryExpression $filter)
Definition
SearchSortingModel.php:244
Commercetools\Api\Models\Search\SearchSortingModel\$filter
$filter
Definition
SearchSortingModel.php:56
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition
BaseJsonObject.php:26
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\SearchQueryExpression
Definition
SearchQueryExpression.php:15
Commercetools\Api\Models\Search\SearchSorting
Definition
SearchSorting.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Search
Definition
SearchAndExpression.php:9
Generated by
1.9.8