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
43use stdClass;
44
49{
54 protected $key;
55
56
60 public function __construct(
61 ?string $key = null
62 ) {
63 $this->key = $key;
64 }
65
72 public function getKey()
73 {
74 if (is_null($this->key)) {
76 $data = $this->raw(self::FIELD_KEY);
77 if (is_null($data)) {
78 return null;
79 }
80 $this->key = (string) $data;
81 }
82
83 return $this->key;
84 }
85
86
90 public function setKey(?string $key): void
91 {
92 $this->key = $key;
93 }
94}