commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
AttributeGroup
AttributeReferenceModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\AttributeGroup
;
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
20
final
class
AttributeReferenceModel
extends
JsonObjectModel
implements
AttributeReference
21
{
26
protected
$key
;
27
28
32
public
function
__construct
(
33
?
string
$key
=
null
34
) {
35
$this->key =
$key
;
36
}
37
44
public
function
getKey
()
45
{
46
if
(is_null($this->key)) {
48
$data = $this->
raw
(self::FIELD_KEY);
49
if
(is_null($data)) {
50
return
null
;
51
}
52
$this->key = (string) $data;
53
}
54
55
return
$this->key
;
56
}
57
58
62
public
function
setKey
(?
string
$key
): void
63
{
64
$this->key =
$key
;
65
}
66
}
Commercetools\Api\Models\AttributeGroup\AttributeReferenceModel
Definition:
AttributeReferenceModel.php:21
Commercetools\Api\Models\AttributeGroup\AttributeReferenceModel\$key
$key
Definition:
AttributeReferenceModel.php:26
Commercetools\Api\Models\AttributeGroup\AttributeReferenceModel\getKey
getKey()
Definition:
AttributeReferenceModel.php:44
Commercetools\Api\Models\AttributeGroup\AttributeReferenceModel\setKey
setKey(?string $key)
Definition:
AttributeReferenceModel.php:62
Commercetools\Api\Models\AttributeGroup\AttributeReferenceModel\__construct
__construct(?string $key=null)
Definition:
AttributeReferenceModel.php:32
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\Api\Models\AttributeGroup\AttributeReference
Definition:
AttributeReference.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\AttributeGroup
Definition:
AttributeGroup.php:9
Generated by
1.9.1