commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Productvariants
LocalizableTextAttributeBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Productvariants
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use
Commercetools\Import\Models\Common\LocalizedString
;
17
use
Commercetools\Import\Models\Common\LocalizedStringBuilder
;
18
use stdClass;
19
23
final
class
LocalizableTextAttributeBuilder
implements
Builder
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
92
public
function
withValueBuilder
(?
LocalizedStringBuilder
$value)
93
{
94
$this->value = $value;
95
96
return
$this;
97
}
98
99
public
function
build
():
LocalizableTextAttribute
100
{
101
return
new
LocalizableTextAttributeModel
(
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
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Import\Models\Common\LocalizedStringBuilder
Definition:
LocalizedStringBuilder.php:20
Commercetools\Import\Models\Common\LocalizedStringBuilder\build
build()
Definition:
LocalizedStringBuilder.php:42
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeBuilder
Definition:
LocalizableTextAttributeBuilder.php:24
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeBuilder\withName
withName(?string $name)
Definition:
LocalizableTextAttributeBuilder.php:70
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeBuilder\getName
getName()
Definition:
LocalizableTextAttributeBuilder.php:45
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeBuilder\withValue
withValue(?LocalizedString $value)
Definition:
LocalizableTextAttributeBuilder.php:81
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeBuilder\build
build()
Definition:
LocalizableTextAttributeBuilder.php:99
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeBuilder\withValueBuilder
withValueBuilder(?LocalizedStringBuilder $value)
Definition:
LocalizableTextAttributeBuilder.php:92
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeBuilder\of
static of()
Definition:
LocalizableTextAttributeBuilder.php:107
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeBuilder\getValue
getValue()
Definition:
LocalizableTextAttributeBuilder.php:61
Commercetools\Import\Models\Productvariants\LocalizableTextAttributeModel
Definition:
LocalizableTextAttributeModel.php:23
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\Import\Models\Productvariants\LocalizableTextAttribute
Definition:
LocalizableTextAttribute.php:16
Commercetools\Import\Models\Productvariants
Definition:
Attribute.php:9
Generated by
1.9.1