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
39use stdClass;
40
45{
50 protected $key;
51
52
56 public function __construct(
57 ?string $key = null
58 ) {
59 $this->key = $key;
60 }
61
68 public function getKey()
69 {
70 if (is_null($this->key)) {
72 $data = $this->raw(self::FIELD_KEY);
73 if (is_null($data)) {
74 return null;
75 }
76 $this->key = (string) $data;
77 }
78
79 return $this->key;
80 }
81
82
86 public function setKey(?string $key): void
87 {
88 $this->key = $key;
89 }
90}