|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* WebHemi. |
|
4
|
|
|
* |
|
5
|
|
|
* PHP version 7.1 |
|
6
|
|
|
* |
|
7
|
|
|
* @copyright 2012 - 2017 Gixx-web (http://www.gixx-web.com) |
|
8
|
|
|
* @license https://opensource.org/licenses/MIT The MIT License (MIT) |
|
9
|
|
|
* |
|
10
|
|
|
* @link http://www.gixx-web.com |
|
11
|
|
|
*/ |
|
12
|
|
|
declare(strict_types = 1); |
|
13
|
|
|
|
|
14
|
|
|
namespace WebHemi\Data\Entity; |
|
15
|
|
|
|
|
16
|
|
|
use WebHemi\Data\EntityInterface; |
|
17
|
|
|
use WebHemi\DateTime; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* Class ApplicationEntity. |
|
21
|
|
|
* |
|
22
|
|
|
* @SuppressWarnings(PHPMD.TooManyFields) |
|
23
|
|
|
*/ |
|
24
|
|
|
class ApplicationEntity implements EntityInterface |
|
25
|
|
|
{ |
|
26
|
|
|
/** @var int */ |
|
27
|
|
|
private $applicationId; |
|
28
|
|
|
/** @var string */ |
|
29
|
|
|
private $name; |
|
30
|
|
|
/** @var string */ |
|
31
|
|
|
private $title; |
|
32
|
|
|
/** @var string */ |
|
33
|
|
|
private $introduction; |
|
34
|
|
|
/** @var string */ |
|
35
|
|
|
private $subject; |
|
36
|
|
|
/** @var string */ |
|
37
|
|
|
private $description; |
|
38
|
|
|
/** @var string */ |
|
39
|
|
|
private $keywords; |
|
40
|
|
|
/** @var string */ |
|
41
|
|
|
private $copyright; |
|
42
|
|
|
/** @var string */ |
|
43
|
|
|
private $path; |
|
44
|
|
|
/** @var string */ |
|
45
|
|
|
private $theme; |
|
46
|
|
|
/** @var string */ |
|
47
|
|
|
private $type; |
|
48
|
|
|
/** @var string */ |
|
49
|
|
|
private $locale; |
|
50
|
|
|
/** @var string */ |
|
51
|
|
|
private $timeZone; |
|
52
|
|
|
/** @var bool */ |
|
53
|
|
|
private $isReadOnly; |
|
54
|
|
|
/** @var bool */ |
|
55
|
|
|
private $isEnabled; |
|
56
|
|
|
/** @var DateTime */ |
|
57
|
|
|
private $dateCreated; |
|
58
|
|
|
/** @var DateTime */ |
|
59
|
|
|
private $dateModified; |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* Sets the value of the entity identifier. |
|
63
|
|
|
* |
|
64
|
|
|
* @param int $entityId |
|
65
|
|
|
* @return ApplicationEntity |
|
66
|
|
|
*/ |
|
67
|
3 |
|
public function setKeyData(int $entityId) : ApplicationEntity |
|
68
|
|
|
{ |
|
69
|
3 |
|
$this->applicationId = $entityId; |
|
70
|
|
|
|
|
71
|
3 |
|
return $this; |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* Gets the value of the entity identifier. |
|
76
|
|
|
* |
|
77
|
|
|
* @return null|int |
|
78
|
|
|
*/ |
|
79
|
5 |
|
public function getKeyData() : ? int |
|
80
|
|
|
{ |
|
81
|
5 |
|
return $this->applicationId; |
|
82
|
|
|
} |
|
83
|
|
|
|
|
84
|
|
|
/** |
|
85
|
|
|
* @param int $applicationId |
|
86
|
|
|
* @return ApplicationEntity |
|
87
|
|
|
*/ |
|
88
|
6 |
|
public function setApplicationId(int $applicationId) : ApplicationEntity |
|
89
|
|
|
{ |
|
90
|
6 |
|
$this->applicationId = $applicationId; |
|
91
|
|
|
|
|
92
|
6 |
|
return $this; |
|
93
|
|
|
} |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* @return null|int |
|
97
|
|
|
*/ |
|
98
|
3 |
|
public function getApplicationId() : ? int |
|
99
|
|
|
{ |
|
100
|
3 |
|
return $this->applicationId; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* @param string $name |
|
105
|
|
|
* @return ApplicationEntity |
|
106
|
|
|
*/ |
|
107
|
6 |
|
public function setName(string $name) : ApplicationEntity |
|
108
|
|
|
{ |
|
109
|
6 |
|
$this->name = $name; |
|
110
|
|
|
|
|
111
|
6 |
|
return $this; |
|
112
|
|
|
} |
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* @return null|string |
|
116
|
|
|
*/ |
|
117
|
4 |
|
public function getName() : ? string |
|
118
|
|
|
{ |
|
119
|
4 |
|
return $this->name; |
|
120
|
|
|
} |
|
121
|
|
|
|
|
122
|
|
|
/** |
|
123
|
|
|
* @param string $title |
|
124
|
|
|
* @return ApplicationEntity |
|
125
|
|
|
*/ |
|
126
|
5 |
|
public function setTitle(string $title) : ApplicationEntity |
|
127
|
|
|
{ |
|
128
|
5 |
|
$this->title = $title; |
|
129
|
|
|
|
|
130
|
5 |
|
return $this; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
/** |
|
134
|
|
|
* @return null|string |
|
135
|
|
|
*/ |
|
136
|
4 |
|
public function getTitle() : ? string |
|
137
|
|
|
{ |
|
138
|
4 |
|
return $this->title; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
/** |
|
142
|
|
|
* @param null|string $description |
|
143
|
|
|
* @return ApplicationEntity |
|
144
|
|
|
*/ |
|
145
|
5 |
|
public function setDescription(? string $description) : ApplicationEntity |
|
146
|
|
|
{ |
|
147
|
5 |
|
$this->description = $description; |
|
148
|
|
|
|
|
149
|
5 |
|
return $this; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
/** |
|
153
|
|
|
* @return null|string |
|
154
|
|
|
*/ |
|
155
|
4 |
|
public function getDescription() : ? string |
|
156
|
|
|
{ |
|
157
|
4 |
|
return $this->description; |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
/** |
|
161
|
|
|
* @param null|string $subject |
|
162
|
|
|
* @return ApplicationEntity |
|
163
|
|
|
*/ |
|
164
|
3 |
|
public function setSubject(? string $subject) : ApplicationEntity |
|
165
|
|
|
{ |
|
166
|
3 |
|
$this->subject = $subject; |
|
167
|
|
|
|
|
168
|
3 |
|
return $this; |
|
169
|
|
|
} |
|
170
|
|
|
|
|
171
|
|
|
/** |
|
172
|
|
|
* @return null|string |
|
173
|
|
|
*/ |
|
174
|
3 |
|
public function getSubject() : ? string |
|
175
|
|
|
{ |
|
176
|
3 |
|
return $this->subject; |
|
177
|
|
|
} |
|
178
|
|
|
|
|
179
|
|
|
/** |
|
180
|
|
|
* @param null|string $keywords |
|
181
|
|
|
* @return ApplicationEntity |
|
182
|
|
|
*/ |
|
183
|
3 |
|
public function setKeywords(? string $keywords) : ApplicationEntity |
|
184
|
|
|
{ |
|
185
|
3 |
|
$this->keywords = $keywords; |
|
186
|
|
|
|
|
187
|
3 |
|
return $this; |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
/** |
|
191
|
|
|
* @return null|string |
|
192
|
|
|
*/ |
|
193
|
3 |
|
public function getKeywords() : ? string |
|
194
|
|
|
{ |
|
195
|
3 |
|
return $this->keywords; |
|
196
|
|
|
} |
|
197
|
|
|
|
|
198
|
|
|
/** |
|
199
|
|
|
* @param null|string $copyright |
|
200
|
|
|
* @return ApplicationEntity |
|
201
|
|
|
*/ |
|
202
|
3 |
|
public function setCopyright(? string $copyright) : ApplicationEntity |
|
203
|
|
|
{ |
|
204
|
3 |
|
$this->copyright = $copyright; |
|
205
|
|
|
|
|
206
|
3 |
|
return $this; |
|
207
|
|
|
} |
|
208
|
|
|
|
|
209
|
|
|
/** |
|
210
|
|
|
* @return null|string |
|
211
|
|
|
*/ |
|
212
|
3 |
|
public function getCopyright() : ? string |
|
213
|
|
|
{ |
|
214
|
3 |
|
return $this->copyright; |
|
215
|
|
|
} |
|
216
|
|
|
|
|
217
|
|
|
/** |
|
218
|
|
|
* @param null|string $path |
|
219
|
|
|
* @return ApplicationEntity |
|
220
|
|
|
*/ |
|
221
|
3 |
|
public function setPath(? string $path) : ApplicationEntity |
|
222
|
|
|
{ |
|
223
|
3 |
|
$this->path = $path; |
|
224
|
|
|
|
|
225
|
3 |
|
return $this; |
|
226
|
|
|
} |
|
227
|
|
|
|
|
228
|
|
|
/** |
|
229
|
|
|
* @return null|string |
|
230
|
|
|
*/ |
|
231
|
3 |
|
public function getPath() : ? string |
|
232
|
|
|
{ |
|
233
|
3 |
|
return $this->path; |
|
234
|
|
|
} |
|
235
|
|
|
|
|
236
|
|
|
/** |
|
237
|
|
|
* @param null|string $theme |
|
238
|
|
|
* @return ApplicationEntity |
|
239
|
|
|
*/ |
|
240
|
3 |
|
public function setTheme(? string $theme) : ApplicationEntity |
|
241
|
|
|
{ |
|
242
|
3 |
|
$this->theme = $theme; |
|
243
|
|
|
|
|
244
|
3 |
|
return $this; |
|
245
|
|
|
} |
|
246
|
|
|
|
|
247
|
|
|
/** |
|
248
|
|
|
* @return null|string |
|
249
|
|
|
*/ |
|
250
|
3 |
|
public function getTheme() : ? string |
|
251
|
|
|
{ |
|
252
|
3 |
|
return $this->theme; |
|
253
|
|
|
} |
|
254
|
|
|
|
|
255
|
|
|
/** |
|
256
|
|
|
* @param null|string $type |
|
257
|
|
|
* @return ApplicationEntity |
|
258
|
|
|
*/ |
|
259
|
3 |
|
public function setType(? string $type) : ApplicationEntity |
|
260
|
|
|
{ |
|
261
|
3 |
|
$this->type = $type; |
|
262
|
|
|
|
|
263
|
3 |
|
return $this; |
|
264
|
|
|
} |
|
265
|
|
|
|
|
266
|
|
|
/** |
|
267
|
|
|
* @return null|string |
|
268
|
|
|
*/ |
|
269
|
3 |
|
public function getType() : ? string |
|
270
|
|
|
{ |
|
271
|
3 |
|
return $this->type; |
|
272
|
|
|
} |
|
273
|
|
|
|
|
274
|
|
|
/** |
|
275
|
|
|
* @param null|string $locale |
|
276
|
|
|
* @return ApplicationEntity |
|
277
|
|
|
*/ |
|
278
|
3 |
|
public function setLocale(? string $locale) : ApplicationEntity |
|
279
|
|
|
{ |
|
280
|
3 |
|
$this->locale = $locale; |
|
281
|
|
|
|
|
282
|
3 |
|
return $this; |
|
283
|
|
|
} |
|
284
|
|
|
|
|
285
|
|
|
/** |
|
286
|
|
|
* @return null|string |
|
287
|
|
|
*/ |
|
288
|
3 |
|
public function getLocale() : ? string |
|
289
|
|
|
{ |
|
290
|
3 |
|
return $this->locale; |
|
291
|
|
|
} |
|
292
|
|
|
|
|
293
|
|
|
/** |
|
294
|
|
|
* @param null|string $timeZone |
|
295
|
|
|
* @return ApplicationEntity |
|
296
|
|
|
*/ |
|
297
|
3 |
|
public function setTimeZone(? string $timeZone) : ApplicationEntity |
|
298
|
|
|
{ |
|
299
|
3 |
|
$this->timeZone = $timeZone; |
|
300
|
|
|
|
|
301
|
3 |
|
return $this; |
|
302
|
|
|
} |
|
303
|
|
|
|
|
304
|
|
|
/** |
|
305
|
|
|
* @return null|string |
|
306
|
|
|
*/ |
|
307
|
3 |
|
public function getTimeZone() : ? string |
|
308
|
|
|
{ |
|
309
|
3 |
|
return $this->timeZone; |
|
310
|
|
|
} |
|
311
|
|
|
|
|
312
|
|
|
/** |
|
313
|
|
|
* @param null|string $introduction |
|
314
|
|
|
* @return ApplicationEntity |
|
315
|
|
|
*/ |
|
316
|
3 |
|
public function setIntroduction(? string $introduction) : ApplicationEntity |
|
317
|
|
|
{ |
|
318
|
3 |
|
$this->introduction = $introduction; |
|
319
|
|
|
|
|
320
|
3 |
|
return $this; |
|
321
|
|
|
} |
|
322
|
|
|
|
|
323
|
|
|
/** |
|
324
|
|
|
* @return null|string |
|
325
|
|
|
*/ |
|
326
|
3 |
|
public function getIntroduction() : ? string |
|
327
|
|
|
{ |
|
328
|
3 |
|
return $this->introduction; |
|
329
|
|
|
} |
|
330
|
|
|
|
|
331
|
|
|
/** |
|
332
|
|
|
* @param bool $state |
|
333
|
|
|
* @return ApplicationEntity |
|
334
|
|
|
*/ |
|
335
|
5 |
|
public function setReadOnly(bool $state) : ApplicationEntity |
|
336
|
|
|
{ |
|
337
|
5 |
|
$this->isReadOnly = $state; |
|
338
|
|
|
|
|
339
|
5 |
|
return $this; |
|
340
|
|
|
} |
|
341
|
|
|
|
|
342
|
|
|
/** |
|
343
|
|
|
* @return bool |
|
344
|
|
|
*/ |
|
345
|
4 |
|
public function getReadOnly() : bool |
|
346
|
|
|
{ |
|
347
|
4 |
|
return $this->isReadOnly ?? false; |
|
348
|
|
|
} |
|
349
|
|
|
|
|
350
|
|
|
/** |
|
351
|
|
|
* @param bool $state |
|
352
|
|
|
* @return ApplicationEntity |
|
353
|
|
|
*/ |
|
354
|
3 |
|
public function setEnabled(bool $state) : ApplicationEntity |
|
355
|
|
|
{ |
|
356
|
3 |
|
$this->isEnabled = $state; |
|
357
|
|
|
|
|
358
|
3 |
|
return $this; |
|
359
|
|
|
} |
|
360
|
|
|
|
|
361
|
|
|
/** |
|
362
|
|
|
* @return bool |
|
363
|
|
|
*/ |
|
364
|
3 |
|
public function getEnabled() : bool |
|
365
|
|
|
{ |
|
366
|
3 |
|
return $this->isEnabled ?? false; |
|
367
|
|
|
} |
|
368
|
|
|
|
|
369
|
|
|
/** |
|
370
|
|
|
* @param DateTime $dateCreated |
|
371
|
|
|
* @return ApplicationEntity |
|
372
|
|
|
*/ |
|
373
|
5 |
|
public function setDateCreated(DateTime $dateCreated) : ApplicationEntity |
|
374
|
|
|
{ |
|
375
|
5 |
|
$this->dateCreated = $dateCreated; |
|
376
|
|
|
|
|
377
|
5 |
|
return $this; |
|
378
|
|
|
} |
|
379
|
|
|
|
|
380
|
|
|
/** |
|
381
|
|
|
* @return null|DateTime |
|
382
|
|
|
*/ |
|
383
|
4 |
|
public function getDateCreated() : ? DateTime |
|
384
|
|
|
{ |
|
385
|
4 |
|
return $this->dateCreated; |
|
386
|
|
|
} |
|
387
|
|
|
|
|
388
|
|
|
/** |
|
389
|
|
|
* @param null|DateTime $dateModified |
|
390
|
|
|
* @return ApplicationEntity |
|
391
|
|
|
*/ |
|
392
|
5 |
|
public function setDateModified(? DateTime $dateModified) : ApplicationEntity |
|
393
|
|
|
{ |
|
394
|
5 |
|
$this->dateModified = $dateModified; |
|
395
|
|
|
|
|
396
|
5 |
|
return $this; |
|
397
|
|
|
} |
|
398
|
|
|
|
|
399
|
|
|
/** |
|
400
|
|
|
* @return null|DateTime |
|
401
|
|
|
*/ |
|
402
|
4 |
|
public function getDateModified() : ? DateTime |
|
403
|
|
|
{ |
|
404
|
4 |
|
return $this->dateModified; |
|
405
|
|
|
} |
|
406
|
|
|
} |
|
407
|
|
|
|