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
56 public function getValue()
57 {
58 return $this->value instanceof LocalizedStringBuilder ? $this->value->build() : $this->value;
59 }
60
65 public function withName(?string $name)
66 {
67 $this->name = $name;
68
69 return $this;
70 }
71
76 public function withValue(?LocalizedString $value)
77 {
78 $this->value = $value;
79
80 return $this;
81 }
82
88 {
89 $this->value = $value;
90
91 return $this;
92 }
93
95 {
97 $this->name,
98 $this->value instanceof LocalizedStringBuilder ? $this->value->build() : $this->value
99 );
100 }
101
102 public static function of(): LocalizableTextAttributeBuilder
103 {
104 return new self();
105 }
106}