commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Search
SearchSortingBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Search
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
SearchSortingBuilder
implements
Builder
22
{
27
private
$field;
28
33
private
$language;
34
39
private
$order;
40
45
private
$mode;
46
51
private
$fieldType;
52
57
private
$filter;
58
65
public
function
getField
()
66
{
67
return
$this->field;
68
}
69
76
public
function
getLanguage
()
77
{
78
return
$this->language;
79
}
80
88
public
function
getOrder
()
89
{
90
return
$this->order;
91
}
92
99
public
function
getMode
()
100
{
101
return
$this->mode;
102
}
103
110
public
function
getFieldType
()
111
{
112
return
$this->fieldType;
113
}
114
121
public
function
getFilter
()
122
{
123
return
$this->filter instanceof
SearchQueryExpressionBuilder
? $this->filter->
build
() : $this->filter;
124
}
125
130
public
function
withField
(?
string
$field)
131
{
132
$this->field = $field;
133
134
return
$this;
135
}
136
141
public
function
withLanguage
(?
string
$language)
142
{
143
$this->language = $language;
144
145
return
$this;
146
}
147
152
public
function
withOrder
(?
string
$order)
153
{
154
$this->order = $order;
155
156
return
$this;
157
}
158
163
public
function
withMode
(?
string
$mode)
164
{
165
$this->mode = $mode;
166
167
return
$this;
168
}
169
174
public
function
withFieldType
(?
string
$fieldType)
175
{
176
$this->fieldType = $fieldType;
177
178
return
$this;
179
}
180
185
public
function
withFilter
(?
SearchQueryExpression
$filter)
186
{
187
$this->filter = $filter;
188
189
return
$this;
190
}
191
196
public
function
withFilterBuilder
(?
SearchQueryExpressionBuilder
$filter)
197
{
198
$this->filter = $filter;
199
200
return
$this;
201
}
202
203
public
function
build
():
SearchSorting
204
{
205
return
new
SearchSortingModel
(
206
$this->field,
207
$this->language,
208
$this->order,
209
$this->mode,
210
$this->fieldType,
211
$this->filter instanceof
SearchQueryExpressionBuilder
? $this->filter->
build
() : $this->filter
212
);
213
}
214
215
public
static
function
of
():
SearchSortingBuilder
216
{
217
return
new
self
();
218
}
219
}
Commercetools\Api\Models\Search\SearchQueryExpressionBuilder
Definition:
SearchQueryExpressionBuilder.php:22
Commercetools\Api\Models\Search\SearchQueryExpressionBuilder\build
build()
Definition:
SearchQueryExpressionBuilder.php:23
Commercetools\Api\Models\Search\SearchSortingBuilder
Definition:
SearchSortingBuilder.php:22
Commercetools\Api\Models\Search\SearchSortingBuilder\getFilter
getFilter()
Definition:
SearchSortingBuilder.php:121
Commercetools\Api\Models\Search\SearchSortingBuilder\withFieldType
withFieldType(?string $fieldType)
Definition:
SearchSortingBuilder.php:174
Commercetools\Api\Models\Search\SearchSortingBuilder\of
static of()
Definition:
SearchSortingBuilder.php:215
Commercetools\Api\Models\Search\SearchSortingBuilder\withMode
withMode(?string $mode)
Definition:
SearchSortingBuilder.php:163
Commercetools\Api\Models\Search\SearchSortingBuilder\getFieldType
getFieldType()
Definition:
SearchSortingBuilder.php:110
Commercetools\Api\Models\Search\SearchSortingBuilder\withFilter
withFilter(?SearchQueryExpression $filter)
Definition:
SearchSortingBuilder.php:185
Commercetools\Api\Models\Search\SearchSortingBuilder\withFilterBuilder
withFilterBuilder(?SearchQueryExpressionBuilder $filter)
Definition:
SearchSortingBuilder.php:196
Commercetools\Api\Models\Search\SearchSortingBuilder\withOrder
withOrder(?string $order)
Definition:
SearchSortingBuilder.php:152
Commercetools\Api\Models\Search\SearchSortingBuilder\getField
getField()
Definition:
SearchSortingBuilder.php:65
Commercetools\Api\Models\Search\SearchSortingBuilder\withLanguage
withLanguage(?string $language)
Definition:
SearchSortingBuilder.php:141
Commercetools\Api\Models\Search\SearchSortingBuilder\withField
withField(?string $field)
Definition:
SearchSortingBuilder.php:130
Commercetools\Api\Models\Search\SearchSortingBuilder\getMode
getMode()
Definition:
SearchSortingBuilder.php:99
Commercetools\Api\Models\Search\SearchSortingBuilder\build
build()
Definition:
SearchSortingBuilder.php:203
Commercetools\Api\Models\Search\SearchSortingBuilder\getLanguage
getLanguage()
Definition:
SearchSortingBuilder.php:76
Commercetools\Api\Models\Search\SearchSortingBuilder\getOrder
getOrder()
Definition:
SearchSortingBuilder.php:88
Commercetools\Api\Models\Search\SearchSortingModel
Definition:
SearchSortingModel.php:21
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\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Search
Definition:
SearchAndExpression.php:9
Generated by
1.9.1