1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace PhpAbac\Example; |
4
|
|
|
|
5
|
|
|
class User { |
6
|
|
|
/** @var int **/ |
7
|
|
|
private $id; |
8
|
|
|
/** @var string **/ |
9
|
|
|
private $name; |
10
|
|
|
/** @var int **/ |
11
|
|
|
private $age; |
12
|
|
|
/** @var string **/ |
13
|
|
|
private $parentNationality; |
14
|
|
|
/** @var bool **/ |
15
|
|
|
private $hasDoneJapd; |
16
|
|
|
/** @var bool **/ |
17
|
|
|
private $hasDrivingLicense; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @param int $id |
21
|
|
|
* @return \PhpAbac\Example\User |
22
|
|
|
*/ |
23
|
1 |
|
public function setId($id) { |
24
|
1 |
|
$this->id = $id; |
25
|
|
|
|
26
|
1 |
|
return $this; |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @return int |
31
|
|
|
*/ |
32
|
1 |
|
public function getId() { |
33
|
1 |
|
return $this->id; |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @param string $name |
38
|
|
|
* @return \PhpAbac\Example\User |
39
|
|
|
*/ |
40
|
1 |
|
public function setName($name) { |
41
|
1 |
|
$this->name = $name; |
42
|
|
|
|
43
|
1 |
|
return $this; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return string |
48
|
|
|
*/ |
49
|
|
|
public function getName() { |
50
|
|
|
return $this->name; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @param int $age |
55
|
|
|
* @return \PhpAbac\Example\User |
56
|
|
|
*/ |
57
|
3 |
|
public function setAge($age) { |
58
|
3 |
|
$this->age = $age; |
59
|
|
|
|
60
|
3 |
|
return $this; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return int |
65
|
|
|
*/ |
66
|
2 |
|
public function getAge() { |
67
|
2 |
|
return $this->age; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @param string $parentNationality |
72
|
|
|
* @return \PhpAbac\Example\User |
73
|
|
|
*/ |
74
|
1 |
|
public function setParentNationality($parentNationality) { |
75
|
1 |
|
$this->parentNationality = $parentNationality; |
76
|
|
|
|
77
|
1 |
|
return $this; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @return bool |
82
|
|
|
*/ |
83
|
1 |
|
public function getParentNationality() { |
84
|
1 |
|
return $this->parentNationality; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @param bool $hasDoneJapd |
89
|
|
|
* @return \PhpAbac\Example\User |
90
|
|
|
*/ |
91
|
1 |
|
public function setHasDoneJapd($hasDoneJapd) { |
92
|
1 |
|
$this->hasDoneJapd = $hasDoneJapd; |
93
|
|
|
|
94
|
1 |
|
return $this; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return bool |
99
|
|
|
*/ |
100
|
1 |
|
public function getHasDoneJapd() { |
101
|
1 |
|
return $this->hasDoneJapd; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @param bool $hasDrivingLicense |
106
|
|
|
* @return \PhpAbac\Example\User |
107
|
|
|
*/ |
108
|
1 |
|
public function setHasDrivingLicense($hasDrivingLicense) { |
109
|
1 |
|
$this->hasDrivingLicense = $hasDrivingLicense; |
110
|
|
|
|
111
|
1 |
|
return $this; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @return bool |
116
|
|
|
*/ |
117
|
1 |
|
public function getHasDrivingLicense() { |
118
|
1 |
|
return $this->hasDrivingLicense; |
119
|
|
|
} |
120
|
|
|
} |