commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ImportResourceModel.php
1<?php
2
3declare(strict_types=1);
10
37use stdClass;
38
43{
48 protected $key;
49
50
54 public function __construct(
55 ?string $key = null
56 ) {
57 $this->key = $key;
58 }
59
66 public function getKey()
67 {
68 if (is_null($this->key)) {
70 $data = $this->raw(self::FIELD_KEY);
71 if (is_null($data)) {
72 return null;
73 }
74 $this->key = (string) $data;
75 }
76
77 return $this->key;
78 }
79
80
84 public function setKey(?string $key): void
85 {
86 $this->key = $key;
87 }
88}