1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ZpgRtf\Objects; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* The Energy Performance Certificate (EPC) provides information about the energy efficiency and environmental impact |
7
|
|
|
* of the property. |
8
|
|
|
*/ |
9
|
|
|
class EpcRatingsObject implements \JsonSerializable |
10
|
|
|
{ |
11
|
|
|
/** @var int */ |
12
|
|
|
private $eerCurrentRating; |
13
|
|
|
|
14
|
|
|
/** @var int */ |
15
|
|
|
private $eerPotentialRating; |
16
|
|
|
|
17
|
|
|
/** @var int */ |
18
|
|
|
private $eirCurrentRating; |
19
|
|
|
|
20
|
|
|
/** @var int */ |
21
|
|
|
private $eirPotentialRating; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @return null|int |
25
|
|
|
*/ |
26
|
3 |
|
public function getEerCurrentRating() |
27
|
|
|
{ |
28
|
3 |
|
return $this->eerCurrentRating; |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @param int $eerCurrentRating |
33
|
|
|
* |
34
|
|
|
* @return EpcRatingsObject |
35
|
|
|
*/ |
36
|
2 |
|
public function setEerCurrentRating(int $eerCurrentRating): self |
37
|
|
|
{ |
38
|
2 |
|
$this->eerCurrentRating = $eerCurrentRating; |
39
|
|
|
|
40
|
2 |
|
return $this; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @return null|int |
45
|
|
|
*/ |
46
|
3 |
|
public function getEerPotentialRating() |
47
|
|
|
{ |
48
|
3 |
|
return $this->eerPotentialRating; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @param int $eerPotentialRating |
53
|
|
|
* |
54
|
|
|
* @return EpcRatingsObject |
55
|
|
|
*/ |
56
|
2 |
|
public function setEerPotentialRating(int $eerPotentialRating): self |
57
|
|
|
{ |
58
|
2 |
|
$this->eerPotentialRating = $eerPotentialRating; |
59
|
|
|
|
60
|
2 |
|
return $this; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return null|int |
65
|
|
|
*/ |
66
|
3 |
|
public function getEirCurrentRating() |
67
|
|
|
{ |
68
|
3 |
|
return $this->eirCurrentRating; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @param int $eirCurrentRating |
73
|
|
|
* |
74
|
|
|
* @return EpcRatingsObject |
75
|
|
|
*/ |
76
|
1 |
|
public function setEirCurrentRating(int $eirCurrentRating): self |
77
|
|
|
{ |
78
|
1 |
|
$this->eirCurrentRating = $eirCurrentRating; |
79
|
|
|
|
80
|
1 |
|
return $this; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @return null|int |
85
|
|
|
*/ |
86
|
3 |
|
public function getEirPotentialRating() |
87
|
|
|
{ |
88
|
3 |
|
return $this->eirPotentialRating; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @param int $eirPotentialRating |
93
|
|
|
* |
94
|
|
|
* @return EpcRatingsObject |
95
|
|
|
*/ |
96
|
1 |
|
public function setEirPotentialRating(int $eirPotentialRating): self |
97
|
|
|
{ |
98
|
1 |
|
$this->eirPotentialRating = $eirPotentialRating; |
99
|
|
|
|
100
|
1 |
|
return $this; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** {@inheritDoc} */ |
104
|
2 |
|
public function jsonSerialize(): array |
105
|
|
|
{ |
106
|
2 |
|
return array_filter([ |
107
|
2 |
|
'eer_current_rating' => $this->getEerCurrentRating(), |
108
|
2 |
|
'eer_potential_rating' => $this->getEerPotentialRating(), |
109
|
2 |
|
'eir_current_rating' => $this->getEirCurrentRating(), |
110
|
2 |
|
'eir_potential_rating' => $this->getEirPotentialRating(), |
111
|
|
|
]); |
112
|
|
|
} |
113
|
|
|
} |
114
|
|
|
|