commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CustomFieldExpandedValueModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
18
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,
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}
__construct(?string $name=null, $value=null, ?LocalizedString $label=null)