1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
* This file is part of the prooph/php-ddd-cargo-sample. |
4
|
|
|
* (c) Alexander Miertsch <[email protected]> |
5
|
|
|
* |
6
|
|
|
* For the full copyright and license information, please view the LICENSE |
7
|
|
|
* file that was distributed with this source code. |
8
|
|
|
* |
9
|
|
|
* Date: 26.03.14 - 22:22 |
10
|
|
|
*/ |
11
|
|
|
declare(strict_types = 1); |
12
|
|
|
|
13
|
|
|
namespace Codeliner\CargoBackend\Application\Booking\Dto; |
14
|
|
|
|
15
|
|
|
use Assert\Assertion; |
16
|
|
|
|
17
|
|
|
class LegDto |
18
|
|
|
{ |
19
|
|
|
/** |
20
|
|
|
* @var string |
21
|
|
|
*/ |
22
|
|
|
private $loadLocation; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
private $unloadLocation; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var string ISO8601 Date |
31
|
|
|
*/ |
32
|
|
|
private $loadTime; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var string ISO8601 Date |
36
|
|
|
*/ |
37
|
|
|
private $unloadTime; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @param string $loadLocation |
41
|
|
|
*/ |
42
|
|
|
public function setLoadLocation(string $loadLocation) |
43
|
|
|
{ |
44
|
|
|
Assertion::notEmpty($loadLocation); |
45
|
|
|
|
46
|
|
|
$this->loadLocation = $loadLocation; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @return string |
51
|
|
|
*/ |
52
|
|
|
public function getLoadLocation(): string |
53
|
|
|
{ |
54
|
|
|
return $this->loadLocation; |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @param string $loadTime |
59
|
|
|
*/ |
60
|
|
|
public function setLoadTime(string $loadTime) |
61
|
|
|
{ |
62
|
|
|
Assertion::notEmpty($loadTime); |
63
|
|
|
|
64
|
|
|
$this->loadTime = $loadTime; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @return string |
69
|
|
|
*/ |
70
|
|
|
public function getLoadTime() |
71
|
|
|
{ |
72
|
|
|
return $this->loadTime; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @param string $unloadLocation |
77
|
|
|
*/ |
78
|
|
|
public function setUnloadLocation(string $unloadLocation) |
79
|
|
|
{ |
80
|
|
|
Assertion::notEmpty($unloadLocation); |
81
|
|
|
|
82
|
|
|
$this->unloadLocation = $unloadLocation; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @return string |
87
|
|
|
*/ |
88
|
|
|
public function getUnloadLocation(): string |
89
|
|
|
{ |
90
|
|
|
return $this->unloadLocation; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @param string $unloadTime |
95
|
|
|
*/ |
96
|
|
|
public function setUnloadTime(string $unloadTime) |
97
|
|
|
{ |
98
|
|
|
Assertion::notEmpty($unloadTime); |
99
|
|
|
|
100
|
|
|
$this->unloadTime = $unloadTime; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return string |
105
|
|
|
*/ |
106
|
|
|
public function getUnloadTime(): string |
107
|
|
|
{ |
108
|
|
|
return $this->unloadTime; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
|
112
|
|
|
} |
113
|
|
|
|