|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the jquery-datatables-bundle package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) 2018 WEBEWEB |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace WBW\Bundle\JQuery\DataTablesBundle\Tests\Fixtures\Entity; |
|
13
|
|
|
|
|
14
|
|
|
use DateTime; |
|
15
|
|
|
use WBW\Library\Traits\Integers\IntegerIdTrait; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Employee entity. |
|
19
|
|
|
* |
|
20
|
|
|
* @author webeweb <https://github.com/webeweb> |
|
21
|
|
|
* @package WBW\Bundle\JQuery\DataTablesBundle\Tests\Fixtures\Entity |
|
22
|
|
|
*/ |
|
23
|
|
|
class Employee { |
|
24
|
|
|
|
|
25
|
|
|
use IntegerIdTrait; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* Age. |
|
29
|
|
|
* |
|
30
|
|
|
* @var int|null |
|
31
|
|
|
*/ |
|
32
|
|
|
private $age; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Name. |
|
36
|
|
|
* |
|
37
|
|
|
* @var string|null |
|
38
|
|
|
*/ |
|
39
|
|
|
private $name; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* Office. |
|
43
|
|
|
* |
|
44
|
|
|
* @var string|null |
|
45
|
|
|
*/ |
|
46
|
|
|
private $office; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* Position. |
|
50
|
|
|
* |
|
51
|
|
|
* @var string|null |
|
52
|
|
|
*/ |
|
53
|
|
|
private $position; |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* Salary. |
|
57
|
|
|
* |
|
58
|
|
|
* @var int|null |
|
59
|
|
|
*/ |
|
60
|
|
|
private $salary; |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* Start date. |
|
64
|
|
|
* |
|
65
|
|
|
* @var DateTime|null |
|
66
|
|
|
*/ |
|
67
|
|
|
private $startDate; |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* Constructor. |
|
71
|
|
|
*/ |
|
72
|
|
|
public function __construct() { |
|
73
|
|
|
// NOTHING TO DO |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* Get the age. |
|
78
|
|
|
* |
|
79
|
|
|
* @return int|null Returns the age. |
|
80
|
|
|
*/ |
|
81
|
|
|
public function getAge(): ?int { |
|
82
|
|
|
return $this->age; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* Get the name. |
|
87
|
|
|
* |
|
88
|
|
|
* @return string|null Returns the name. |
|
89
|
|
|
*/ |
|
90
|
|
|
public function getName(): ?string { |
|
91
|
|
|
return $this->name; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* Get the office. |
|
96
|
|
|
* |
|
97
|
|
|
* @return string|null Returns the office. |
|
98
|
|
|
*/ |
|
99
|
|
|
public function getOffice(): ?string { |
|
100
|
|
|
return $this->office; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* Get the position. |
|
105
|
|
|
* |
|
106
|
|
|
* @return string|null Returns the position. |
|
107
|
|
|
*/ |
|
108
|
|
|
public function getPosition(): ?string { |
|
109
|
|
|
return $this->position; |
|
110
|
|
|
} |
|
111
|
|
|
|
|
112
|
|
|
/** |
|
113
|
|
|
* Get the salary. |
|
114
|
|
|
* |
|
115
|
|
|
* @return int|null Returns the salary. |
|
116
|
|
|
*/ |
|
117
|
|
|
public function getSalary(): ?int { |
|
118
|
|
|
return $this->salary; |
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
/** |
|
122
|
|
|
* Get the start date. |
|
123
|
|
|
* |
|
124
|
|
|
* @return DateTime|null Returns the start date. |
|
125
|
|
|
*/ |
|
126
|
|
|
public function getStartDate(): ?DateTime { |
|
127
|
|
|
return $this->startDate; |
|
128
|
|
|
} |
|
129
|
|
|
|
|
130
|
|
|
/** |
|
131
|
|
|
* Set the age. |
|
132
|
|
|
* |
|
133
|
|
|
* @param int|null $age The age. |
|
134
|
|
|
* @return Employee Returns this employee. |
|
135
|
|
|
*/ |
|
136
|
|
|
public function setAge(?int $age): Employee { |
|
137
|
|
|
$this->age = $age; |
|
138
|
|
|
return $this; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
/** |
|
142
|
|
|
* Set the name. |
|
143
|
|
|
* |
|
144
|
|
|
* @param string|null $name The name. |
|
145
|
|
|
* @return Employee Returns this employee. |
|
146
|
|
|
*/ |
|
147
|
|
|
public function setName(?string $name): Employee { |
|
148
|
|
|
$this->name = $name; |
|
149
|
|
|
return $this; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
/** |
|
153
|
|
|
* Set the office. |
|
154
|
|
|
* |
|
155
|
|
|
* @param string|null $office The office. |
|
156
|
|
|
* @return Employee Returns this employee. |
|
157
|
|
|
*/ |
|
158
|
|
|
public function setOffice(?string $office): Employee { |
|
159
|
|
|
$this->office = $office; |
|
160
|
|
|
return $this; |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
/** |
|
164
|
|
|
* Set the position. |
|
165
|
|
|
* |
|
166
|
|
|
* @param string|null $position The position. |
|
167
|
|
|
* @return Employee Returns this employee. |
|
168
|
|
|
*/ |
|
169
|
|
|
public function setPosition(?string $position): Employee { |
|
170
|
|
|
$this->position = $position; |
|
171
|
|
|
return $this; |
|
172
|
|
|
} |
|
173
|
|
|
|
|
174
|
|
|
/** |
|
175
|
|
|
* Set the salary. |
|
176
|
|
|
* |
|
177
|
|
|
* @param int|null $salary The salary. |
|
178
|
|
|
* @return Employee Returns this employee. |
|
179
|
|
|
*/ |
|
180
|
|
|
public function setSalary(?int $salary): Employee { |
|
181
|
|
|
$this->salary = $salary; |
|
182
|
|
|
return $this; |
|
183
|
|
|
} |
|
184
|
|
|
|
|
185
|
|
|
/** |
|
186
|
|
|
* Set the start date. |
|
187
|
|
|
* |
|
188
|
|
|
* @param DateTime|null $startDate The start date. |
|
189
|
|
|
* @return Employee Returns this employee. |
|
190
|
|
|
*/ |
|
191
|
|
|
public function setStartDate(?DateTime $startDate): Employee { |
|
192
|
|
|
$this->startDate = $startDate; |
|
193
|
|
|
return $this; |
|
194
|
|
|
} |
|
195
|
|
|
} |
|
196
|
|
|
|