1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace PhpAbac\Example; |
4
|
|
|
|
5
|
|
|
class Vehicle |
6
|
|
|
{ |
7
|
|
|
/** @var int **/ |
8
|
|
|
private $id; |
9
|
|
|
/** @var \PhpAbac\Example\User **/ |
10
|
|
|
private $owner; |
11
|
|
|
/** @var string **/ |
12
|
|
|
private $brand; |
13
|
|
|
/** @var string **/ |
14
|
|
|
private $model; |
15
|
|
|
/** @var \DateTime **/ |
16
|
|
|
private $lastTechnicalReviewDate; |
17
|
|
|
/** @var \DateTime **/ |
18
|
|
|
private $manufactureDate; |
19
|
|
|
/** @var string **/ |
20
|
|
|
private $origin; |
21
|
|
|
/** @var string **/ |
22
|
|
|
private $engineType; |
23
|
|
|
/** @var string **/ |
24
|
|
|
private $ecoClass; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @param int $id |
28
|
|
|
* @return \PhpAbac\Example\Vehicle |
29
|
|
|
*/ |
30
|
3 |
|
public function setId($id) |
31
|
|
|
{ |
32
|
3 |
|
$this->id = $id; |
33
|
|
|
|
34
|
3 |
|
return $this; |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @return int |
39
|
|
|
*/ |
40
|
|
|
public function getId() |
41
|
|
|
{ |
42
|
|
|
return $this->id; |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @param \PhpAbac\Example\User $owner |
47
|
|
|
* @return \PhpAbac\Example\Vehicle |
48
|
|
|
*/ |
49
|
3 |
|
public function setOwner(User $owner) |
50
|
|
|
{ |
51
|
3 |
|
$this->owner = $owner; |
52
|
|
|
|
53
|
3 |
|
return $this; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return \PhpAbac\Example\User |
58
|
|
|
*/ |
59
|
1 |
|
public function getOwner() |
60
|
|
|
{ |
61
|
1 |
|
return $this->owner; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @param string $brand |
66
|
|
|
* @return \PhpAbac\Example\Vehicle |
67
|
|
|
*/ |
68
|
2 |
|
public function setBrand($brand) |
69
|
|
|
{ |
70
|
2 |
|
$this->brand = $brand; |
71
|
|
|
|
72
|
2 |
|
return $this; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @return string |
77
|
|
|
*/ |
78
|
|
|
public function getBrand() |
79
|
|
|
{ |
80
|
|
|
return $this->brand; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* |
85
|
|
|
* @param string $model |
86
|
|
|
* @return \PhpAbac\Example\Vehicle |
87
|
|
|
*/ |
88
|
2 |
|
public function setModel($model) |
89
|
|
|
{ |
90
|
2 |
|
$this->model = $model; |
91
|
|
|
|
92
|
2 |
|
return $this; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @return string |
97
|
|
|
*/ |
98
|
|
|
public function getModel() |
99
|
|
|
{ |
100
|
|
|
return $this->model; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @param \DateTime $lastTechnicalReviewDate |
105
|
|
|
* @return \PhpAbac\Example\Vehicle |
106
|
|
|
*/ |
107
|
2 |
|
public function setLastTechnicalReviewDate(\DateTime $lastTechnicalReviewDate) |
108
|
|
|
{ |
109
|
2 |
|
$this->lastTechnicalReviewDate = $lastTechnicalReviewDate; |
110
|
|
|
|
111
|
2 |
|
return $this; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @return \DateTime |
116
|
|
|
*/ |
117
|
1 |
|
public function getLastTechnicalReviewDate() |
118
|
|
|
{ |
119
|
1 |
|
return $this->lastTechnicalReviewDate; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @param \DateTime $manufactureDate |
124
|
|
|
* @return \PhpAbac\Example\Vehicle |
125
|
|
|
*/ |
126
|
2 |
|
public function setManufactureDate(\DateTime $manufactureDate) |
127
|
|
|
{ |
128
|
2 |
|
$this->manufactureDate = $manufactureDate; |
129
|
|
|
|
130
|
2 |
|
return $this; |
131
|
|
|
} |
132
|
|
|
|
133
|
1 |
|
public function getManufactureDate() |
134
|
|
|
{ |
135
|
1 |
|
return $this->manufactureDate; |
136
|
|
|
} |
137
|
|
|
|
138
|
2 |
|
public function setOrigin($origin) |
139
|
|
|
{ |
140
|
2 |
|
$this->origin = $origin; |
141
|
|
|
|
142
|
2 |
|
return $this; |
143
|
|
|
} |
144
|
|
|
|
145
|
1 |
|
public function getOrigin() |
146
|
|
|
{ |
147
|
1 |
|
return $this->origin; |
148
|
|
|
} |
149
|
|
|
|
150
|
2 |
|
public function setEngineType($engineType) |
151
|
|
|
{ |
152
|
2 |
|
$this->engineType = $engineType; |
153
|
|
|
|
154
|
2 |
|
return $this; |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
public function getEngineType() |
158
|
|
|
{ |
159
|
|
|
return $this->engineType; |
160
|
|
|
} |
161
|
|
|
|
162
|
2 |
|
public function setEcoClass($ecoClass) |
163
|
|
|
{ |
164
|
2 |
|
$this->ecoClass = $ecoClass; |
165
|
|
|
|
166
|
2 |
|
return $this; |
167
|
|
|
} |
168
|
|
|
|
169
|
|
|
public function getEcoClass() |
170
|
|
|
{ |
171
|
|
|
return $this->ecoClass; |
172
|
|
|
} |
173
|
|
|
} |
174
|
|
|
|