commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Search
SearchOrExpressionModel.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
SearchOrExpressionModel
extends
JsonObjectModel
implements
SearchOrExpression
21
{
26
protected
$or
;
27
28
32
public
function
__construct
(
33
?
SearchQueryCollection
$or
=
null
34
) {
35
$this->or =
$or
;
36
}
37
42
public
function
getOr
()
43
{
44
if
(is_null($this->or)) {
46
$data = $this->
raw
(self::FIELD_OR);
47
if
(is_null($data)) {
48
return
null
;
49
}
50
$this->or =
SearchQueryCollection::fromArray
($data);
51
}
52
53
return
$this->or
;
54
}
55
56
60
public
function
setOr
(?
SearchQueryCollection
$or
): void
61
{
62
$this->or =
$or
;
63
}
64
}
Commercetools\Api\Models\Search\SearchOrExpressionModel
Definition:
SearchOrExpressionModel.php:21
Commercetools\Api\Models\Search\SearchOrExpressionModel\setOr
setOr(?SearchQueryCollection $or)
Definition:
SearchOrExpressionModel.php:60
Commercetools\Api\Models\Search\SearchOrExpressionModel\getOr
getOr()
Definition:
SearchOrExpressionModel.php:42
Commercetools\Api\Models\Search\SearchOrExpressionModel\$or
$or
Definition:
SearchOrExpressionModel.php:26
Commercetools\Api\Models\Search\SearchOrExpressionModel\__construct
__construct(?SearchQueryCollection $or=null)
Definition:
SearchOrExpressionModel.php:32
Commercetools\Api\Models\Search\SearchQueryCollection
Definition:
SearchQueryCollection.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\Base\MapperSequence\fromArray
static fromArray(array $data)
Definition:
MapperSequence.php:56
Commercetools\Api\Models\Search\SearchOrExpression
Definition:
SearchOrExpression.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Search
Definition:
SearchAndExpression.php:9
Generated by
1.9.1