commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
AssetDimensionsModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $w;
27 
32  protected $h;
33 
34 
38  public function __construct(
39  ?int $w = null,
40  ?int $h = null
41  ) {
42  $this->w = $w;
43  $this->h = $h;
44  }
45 
52  public function getW()
53  {
54  if (is_null($this->w)) {
56  $data = $this->raw(self::FIELD_W);
57  if (is_null($data)) {
58  return null;
59  }
60  $this->w = (int) $data;
61  }
62 
63  return $this->w;
64  }
65 
72  public function getH()
73  {
74  if (is_null($this->h)) {
76  $data = $this->raw(self::FIELD_H);
77  if (is_null($data)) {
78  return null;
79  }
80  $this->h = (int) $data;
81  }
82 
83  return $this->h;
84  }
85 
86 
90  public function setW(?int $w): void
91  {
92  $this->w = $w;
93  }
94 
98  public function setH(?int $h): void
99  {
100  $this->h = $h;
101  }
102 }