1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Gueststream\PMS\IQWare\API; |
4
|
|
|
|
5
|
|
|
class WSCRS_GetNewAvailability |
6
|
|
|
{ |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* @var \DateTime $StartDate |
10
|
|
|
*/ |
11
|
|
|
protected $StartDate = null; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @var \DateTime $EndDate |
15
|
|
|
*/ |
16
|
|
|
protected $EndDate = null; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @var boolean $IsSuite |
20
|
|
|
*/ |
21
|
|
|
protected $IsSuite = null; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @param \DateTime $StartDate |
25
|
|
|
* @param \DateTime $EndDate |
26
|
|
|
* @param boolean $IsSuite |
27
|
|
|
*/ |
28
|
|
|
public function __construct(\DateTime $StartDate, \DateTime $EndDate, $IsSuite) |
29
|
|
|
{ |
30
|
|
|
$this->StartDate = $StartDate->format(\DateTime::ATOM); |
|
|
|
|
31
|
|
|
$this->EndDate = $EndDate->format(\DateTime::ATOM); |
|
|
|
|
32
|
|
|
$this->IsSuite = $IsSuite; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @return \DateTime |
37
|
|
|
*/ |
38
|
|
|
public function getStartDate() |
39
|
|
|
{ |
40
|
|
|
if ($this->StartDate == null) { |
41
|
|
|
return null; |
42
|
|
|
} else { |
43
|
|
|
try { |
44
|
|
|
return new \DateTime($this->StartDate); |
45
|
|
|
} catch (\Exception $e) { |
46
|
|
|
return false; |
47
|
|
|
} |
48
|
|
|
} |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @param \DateTime $StartDate |
53
|
|
|
* @return \Gueststream\PMS\IQWare\API\WSCRS_GetNewAvailability |
54
|
|
|
*/ |
55
|
|
|
public function setStartDate(\DateTime $StartDate) |
56
|
|
|
{ |
57
|
|
|
$this->StartDate = $StartDate->format(\DateTime::ATOM); |
|
|
|
|
58
|
|
|
return $this; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @return \DateTime |
63
|
|
|
*/ |
64
|
|
|
public function getEndDate() |
65
|
|
|
{ |
66
|
|
|
if ($this->EndDate == null) { |
67
|
|
|
return null; |
68
|
|
|
} else { |
69
|
|
|
try { |
70
|
|
|
return new \DateTime($this->EndDate); |
71
|
|
|
} catch (\Exception $e) { |
72
|
|
|
return false; |
73
|
|
|
} |
74
|
|
|
} |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @param \DateTime $EndDate |
79
|
|
|
* @return \Gueststream\PMS\IQWare\API\WSCRS_GetNewAvailability |
80
|
|
|
*/ |
81
|
|
|
public function setEndDate(\DateTime $EndDate) |
82
|
|
|
{ |
83
|
|
|
$this->EndDate = $EndDate->format(\DateTime::ATOM); |
|
|
|
|
84
|
|
|
return $this; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @return boolean |
89
|
|
|
*/ |
90
|
|
|
public function getIsSuite() |
91
|
|
|
{ |
92
|
|
|
return $this->IsSuite; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @param boolean $IsSuite |
97
|
|
|
* @return \Gueststream\PMS\IQWare\API\WSCRS_GetNewAvailability |
98
|
|
|
*/ |
99
|
|
|
public function setIsSuite($IsSuite) |
100
|
|
|
{ |
101
|
|
|
$this->IsSuite = $IsSuite; |
102
|
|
|
return $this; |
103
|
|
|
} |
104
|
|
|
} |
105
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..