commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
LocalizableTextAttributeBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
24{
29 private $name;
30
35 private $value;
36
45 public function getName()
46 {
47 return $this->name;
48 }
49
61 public function getValue()
62 {
63 return $this->value instanceof LocalizedStringBuilder ? $this->value->build() : $this->value;
64 }
65
70 public function withName(?string $name)
71 {
72 $this->name = $name;
73
74 return $this;
75 }
76
81 public function withValue(?LocalizedString $value)
82 {
83 $this->value = $value;
84
85 return $this;
86 }
87
93 {
94 $this->value = $value;
95
96 return $this;
97 }
98
100 {
102 $this->name,
103 $this->value instanceof LocalizedStringBuilder ? $this->value->build() : $this->value
104 );
105 }
106
107 public static function of(): LocalizableTextAttributeBuilder
108 {
109 return new self();
110 }
111}