commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
ApprovalRule
ApproverConjunctionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ApprovalRule
;
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
ApproverConjunctionModel
extends
JsonObjectModel
implements
ApproverConjunction
21
{
26
protected
$and
;
27
28
32
public
function
__construct
(
33
?
ApproverDisjunctionCollection
$and
=
null
34
) {
35
$this->and =
$and
;
36
}
37
44
public
function
getAnd
()
45
{
46
if
(is_null($this->and)) {
48
$data = $this->
raw
(self::FIELD_AND);
49
if
(is_null($data)) {
50
return
null
;
51
}
52
$this->and =
ApproverDisjunctionCollection::fromArray
($data);
53
}
54
55
return
$this->and
;
56
}
57
58
62
public
function
setAnd
(?
ApproverDisjunctionCollection
$and
): void
63
{
64
$this->and =
$and
;
65
}
66
}
Commercetools\Api\Models\ApprovalRule\ApproverConjunctionModel
Definition:
ApproverConjunctionModel.php:21
Commercetools\Api\Models\ApprovalRule\ApproverConjunctionModel\__construct
__construct(?ApproverDisjunctionCollection $and=null)
Definition:
ApproverConjunctionModel.php:32
Commercetools\Api\Models\ApprovalRule\ApproverConjunctionModel\getAnd
getAnd()
Definition:
ApproverConjunctionModel.php:44
Commercetools\Api\Models\ApprovalRule\ApproverConjunctionModel\$and
$and
Definition:
ApproverConjunctionModel.php:26
Commercetools\Api\Models\ApprovalRule\ApproverConjunctionModel\setAnd
setAnd(?ApproverDisjunctionCollection $and)
Definition:
ApproverConjunctionModel.php:62
Commercetools\Api\Models\ApprovalRule\ApproverDisjunctionCollection
Definition:
ApproverDisjunctionCollection.php:22
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\ApprovalRule\ApproverConjunction
Definition:
ApproverConjunction.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\ApprovalRule
Definition:
ApprovalRule.php:9
Generated by
1.9.1