commercetools-sdk-php-v2
master
The platform, import-api and ml-api PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Common
AssetDimensionsModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Common
;
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
AssetDimensionsModel
extends
JsonObjectModel
implements
AssetDimensions
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
}
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\Import\Models\Common\AssetDimensionsModel
Definition:
AssetDimensionsModel.php:21
Commercetools\Import\Models\Common\AssetDimensionsModel\getH
getH()
Definition:
AssetDimensionsModel.php:72
Commercetools\Import\Models\Common\AssetDimensionsModel\setW
setW(?int $w)
Definition:
AssetDimensionsModel.php:90
Commercetools\Import\Models\Common\AssetDimensionsModel\$w
$w
Definition:
AssetDimensionsModel.php:26
Commercetools\Import\Models\Common\AssetDimensionsModel\__construct
__construct(?int $w=null, ?int $h=null)
Definition:
AssetDimensionsModel.php:38
Commercetools\Import\Models\Common\AssetDimensionsModel\$h
$h
Definition:
AssetDimensionsModel.php:32
Commercetools\Import\Models\Common\AssetDimensionsModel\getW
getW()
Definition:
AssetDimensionsModel.php:52
Commercetools\Import\Models\Common\AssetDimensionsModel\setH
setH(?int $h)
Definition:
AssetDimensionsModel.php:98
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Common\AssetDimensions
Definition:
AssetDimensions.php:15
Commercetools\Import\Models\Common
Definition:
Address.php:9
Generated by
1.9.1