commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
ContainerAndKeyModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
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
ContainerAndKeyModel
extends
JsonObjectModel
implements
ContainerAndKey
21
{
26
protected
$key
;
27
32
protected
$container
;
33
34
38
public
function
__construct
(
39
?
string
$key
=
null
,
40
?
string
$container
=
null
41
) {
42
$this->key =
$key
;
43
$this->container =
$container
;
44
}
45
52
public
function
getKey
()
53
{
54
if
(is_null($this->key)) {
56
$data = $this->
raw
(self::FIELD_KEY);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->key = (string) $data;
61
}
62
63
return
$this->key
;
64
}
65
72
public
function
getContainer
()
73
{
74
if
(is_null($this->container)) {
76
$data = $this->
raw
(self::FIELD_CONTAINER);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
$this->container = (string) $data;
81
}
82
83
return
$this->container
;
84
}
85
86
90
public
function
setKey
(?
string
$key
): void
91
{
92
$this->key =
$key
;
93
}
94
98
public
function
setContainer
(?
string
$container
): void
99
{
100
$this->container =
$container
;
101
}
102
}
Commercetools\Api\Models\Message\ContainerAndKeyModel
Definition:
ContainerAndKeyModel.php:21
Commercetools\Api\Models\Message\ContainerAndKeyModel\$container
$container
Definition:
ContainerAndKeyModel.php:32
Commercetools\Api\Models\Message\ContainerAndKeyModel\getContainer
getContainer()
Definition:
ContainerAndKeyModel.php:72
Commercetools\Api\Models\Message\ContainerAndKeyModel\$key
$key
Definition:
ContainerAndKeyModel.php:26
Commercetools\Api\Models\Message\ContainerAndKeyModel\setKey
setKey(?string $key)
Definition:
ContainerAndKeyModel.php:90
Commercetools\Api\Models\Message\ContainerAndKeyModel\getKey
getKey()
Definition:
ContainerAndKeyModel.php:52
Commercetools\Api\Models\Message\ContainerAndKeyModel\setContainer
setContainer(?string $container)
Definition:
ContainerAndKeyModel.php:98
Commercetools\Api\Models\Message\ContainerAndKeyModel\__construct
__construct(?string $key=null, ?string $container=null)
Definition:
ContainerAndKeyModel.php:38
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\Api\Models\Message\ContainerAndKey
Definition:
ContainerAndKey.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Message
Definition:
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.1