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