commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
CustomFieldExpandedValueModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeValue
;
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
use
Commercetools\History\Models\Common\LocalizedString
;
17
use
Commercetools\History\Models\Common\LocalizedStringModel
;
18
22
final
class
CustomFieldExpandedValueModel
extends
JsonObjectModel
implements
CustomFieldExpandedValue
23
{
24
25
30
protected
$name
;
31
36
protected
$value
;
37
42
protected
$label
;
43
44
48
public
function
__construct
(
49
?
string
$name
=
null
,
50
$value
=
null
,
51
?
LocalizedString
$label
=
null
52
) {
53
$this->name =
$name
;
54
$this->value =
$value
;
55
$this->label =
$label
;
56
57
}
58
65
public
function
getName
()
66
{
67
if
(is_null($this->name)) {
69
$data = $this->
raw
(self::FIELD_NAME);
70
if
(is_null($data)) {
71
return
null
;
72
}
73
$this->name = (string) $data;
74
}
75
76
return
$this->name
;
77
}
78
85
public
function
getValue
()
86
{
87
if
(is_null($this->value)) {
89
$data = $this->
raw
(self::FIELD_VALUE);
90
if
(is_null($data)) {
91
return
null
;
92
}
93
$this->value = $data;
94
}
95
96
return
$this->value
;
97
}
98
105
public
function
getLabel
()
106
{
107
if
(is_null($this->label)) {
109
$data = $this->
raw
(self::FIELD_LABEL);
110
if
(is_null($data)) {
111
return
null
;
112
}
113
114
$this->label =
LocalizedStringModel::of
($data);
115
}
116
117
return
$this->label
;
118
}
119
120
124
public
function
setName
(?
string
$name
): void
125
{
126
$this->name =
$name
;
127
}
128
132
public
function
setValue
(
$value
): void
133
{
134
$this->value =
$value
;
135
}
136
140
public
function
setLabel
(?
LocalizedString
$label
): void
141
{
142
$this->label =
$label
;
143
}
144
145
146
147
}
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\MapperMap\of
static of($data=null)
Definition:
MapperMap.php:45
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel
Definition:
CustomFieldExpandedValueModel.php:23
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\$value
$value
Definition:
CustomFieldExpandedValueModel.php:36
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\setLabel
setLabel(?LocalizedString $label)
Definition:
CustomFieldExpandedValueModel.php:140
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\getLabel
getLabel()
Definition:
CustomFieldExpandedValueModel.php:105
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\$label
$label
Definition:
CustomFieldExpandedValueModel.php:42
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\setValue
setValue( $value)
Definition:
CustomFieldExpandedValueModel.php:132
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\setName
setName(?string $name)
Definition:
CustomFieldExpandedValueModel.php:124
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\getName
getName()
Definition:
CustomFieldExpandedValueModel.php:65
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\getValue
getValue()
Definition:
CustomFieldExpandedValueModel.php:85
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\$name
$name
Definition:
CustomFieldExpandedValueModel.php:30
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel\__construct
__construct(?string $name=null, $value=null, ?LocalizedString $label=null)
Definition:
CustomFieldExpandedValueModel.php:48
Commercetools\History\Models\Common\LocalizedStringModel
Definition:
LocalizedStringModel.php:17
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValue
Definition:
CustomFieldExpandedValue.php:16
Commercetools\History\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1