1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ChinLeung\PhpWeekday; |
4
|
|
|
|
5
|
|
|
trait HasVerboseMethods |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* Function to retrieve the name in Afrikaans. |
9
|
|
|
* |
10
|
|
|
* @return string |
11
|
|
|
*/ |
12
|
|
|
public function inAfrikaans() : string |
13
|
|
|
{ |
14
|
|
|
return $this->getName('af'); |
|
|
|
|
15
|
|
|
} |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Function to retrieve the name in Albanian. |
19
|
|
|
* |
20
|
|
|
* @return string |
21
|
|
|
*/ |
22
|
|
|
public function inAlbanian() : string |
23
|
|
|
{ |
24
|
|
|
return $this->getName('sq'); |
|
|
|
|
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* Function to retrieve the name in Amharic. |
29
|
|
|
* |
30
|
|
|
* @return string |
31
|
|
|
*/ |
32
|
|
|
public function inAmharic() : string |
33
|
|
|
{ |
34
|
|
|
return $this->getName('am'); |
|
|
|
|
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Function to retrieve the name in Arabic. |
39
|
|
|
* |
40
|
|
|
* @return string |
41
|
|
|
*/ |
42
|
|
|
public function inArabic() : string |
43
|
|
|
{ |
44
|
|
|
return $this->getName('ar'); |
|
|
|
|
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Function to retrieve the name in Armenian. |
49
|
|
|
* |
50
|
|
|
* @return string |
51
|
|
|
*/ |
52
|
|
|
public function inArmenian() : string |
53
|
|
|
{ |
54
|
|
|
return $this->getName('hy'); |
|
|
|
|
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Function to retrieve the name in Azerbaijani. |
59
|
|
|
* |
60
|
|
|
* @return string |
61
|
|
|
*/ |
62
|
|
|
public function inAzerbaijani() : string |
63
|
|
|
{ |
64
|
|
|
return $this->getName('az'); |
|
|
|
|
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Function to retrieve the name in Basque. |
69
|
|
|
* |
70
|
|
|
* @return string |
71
|
|
|
*/ |
72
|
|
|
public function inBasque() : string |
73
|
|
|
{ |
74
|
|
|
return $this->getName('eu'); |
|
|
|
|
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* Function to retrieve the name in Belarusian. |
79
|
|
|
* |
80
|
|
|
* @return string |
81
|
|
|
*/ |
82
|
|
|
public function inBelarusian() : string |
83
|
|
|
{ |
84
|
|
|
return $this->getName('be'); |
|
|
|
|
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* Function to retrieve the name in Bengali. |
89
|
|
|
* |
90
|
|
|
* @return string |
91
|
|
|
*/ |
92
|
|
|
public function inBengali() : string |
93
|
|
|
{ |
94
|
|
|
return $this->getName('bn'); |
|
|
|
|
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* Function to retrieve the name in Bosnian. |
99
|
|
|
* |
100
|
|
|
* @return string |
101
|
|
|
*/ |
102
|
|
|
public function inBosnian() : string |
103
|
|
|
{ |
104
|
|
|
return $this->getName('bs'); |
|
|
|
|
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* Function to retrieve the name in Bulgarian. |
109
|
|
|
* |
110
|
|
|
* @return string |
111
|
|
|
*/ |
112
|
|
|
public function inBulgarian() : string |
113
|
|
|
{ |
114
|
|
|
return $this->getName('bg'); |
|
|
|
|
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* Function to retrieve the name in Catalan. |
119
|
|
|
* |
120
|
|
|
* @return string |
121
|
|
|
*/ |
122
|
|
|
public function inCatalan() : string |
123
|
|
|
{ |
124
|
|
|
return $this->getName('ca'); |
|
|
|
|
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* Function to retrieve the name in Cebuano. |
129
|
|
|
* |
130
|
|
|
* @return string |
131
|
|
|
*/ |
132
|
|
|
public function inCebuano() : string |
133
|
|
|
{ |
134
|
|
|
return $this->getName('ceb'); |
|
|
|
|
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* Function to retrieve the name in Chichewa. |
139
|
|
|
* |
140
|
|
|
* @return string |
141
|
|
|
*/ |
142
|
|
|
public function inChichewa() : string |
143
|
|
|
{ |
144
|
|
|
return $this->getName('ny'); |
|
|
|
|
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* Function to retrieve the name in Chinese (Simplified). |
149
|
|
|
* |
150
|
|
|
* @return string |
151
|
|
|
*/ |
152
|
|
|
public function inSimplifiedChinese() : string |
153
|
|
|
{ |
154
|
|
|
return $this->getName('zh_CN'); |
|
|
|
|
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* Function to retrieve the name in Chinese (Traditional). |
159
|
|
|
* |
160
|
|
|
* @return string |
161
|
|
|
*/ |
162
|
|
|
public function inTraditionalChinese() : string |
163
|
|
|
{ |
164
|
|
|
return $this->getName('zh_TW'); |
|
|
|
|
165
|
|
|
} |
166
|
|
|
|
167
|
|
|
/** |
168
|
|
|
* Function to retrieve the name in Corsican. |
169
|
|
|
* |
170
|
|
|
* @return string |
171
|
|
|
*/ |
172
|
|
|
public function inCorsican() : string |
173
|
|
|
{ |
174
|
|
|
return $this->getName('co'); |
|
|
|
|
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* Function to retrieve the name in Croatian. |
179
|
|
|
* |
180
|
|
|
* @return string |
181
|
|
|
*/ |
182
|
|
|
public function inCroatian() : string |
183
|
|
|
{ |
184
|
|
|
return $this->getName('hr'); |
|
|
|
|
185
|
|
|
} |
186
|
|
|
|
187
|
|
|
/** |
188
|
|
|
* Function to retrieve the name in Czech. |
189
|
|
|
* |
190
|
|
|
* @return string |
191
|
|
|
*/ |
192
|
|
|
public function inCzech() : string |
193
|
|
|
{ |
194
|
|
|
return $this->getName('cs'); |
|
|
|
|
195
|
|
|
} |
196
|
|
|
|
197
|
|
|
/** |
198
|
|
|
* Function to retrieve the name in Danish. |
199
|
|
|
* |
200
|
|
|
* @return string |
201
|
|
|
*/ |
202
|
|
|
public function inDanish() : string |
203
|
|
|
{ |
204
|
|
|
return $this->getName('da'); |
|
|
|
|
205
|
|
|
} |
206
|
|
|
|
207
|
|
|
/** |
208
|
|
|
* Function to retrieve the name in Dutch. |
209
|
|
|
* |
210
|
|
|
* @return string |
211
|
|
|
*/ |
212
|
|
|
public function inDutch() : string |
213
|
|
|
{ |
214
|
|
|
return $this->getName('nl'); |
|
|
|
|
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
/** |
218
|
|
|
* Function to retrieve the name in English. |
219
|
|
|
* |
220
|
|
|
* @return string |
221
|
|
|
*/ |
222
|
|
|
public function inEnglish() : string |
223
|
|
|
{ |
224
|
|
|
return $this->getName('en'); |
|
|
|
|
225
|
|
|
} |
226
|
|
|
|
227
|
|
|
/** |
228
|
|
|
* Function to retrieve the name in Esperanto. |
229
|
|
|
* |
230
|
|
|
* @return string |
231
|
|
|
*/ |
232
|
|
|
public function inEsperanto() : string |
233
|
|
|
{ |
234
|
|
|
return $this->getName('eo'); |
|
|
|
|
235
|
|
|
} |
236
|
|
|
|
237
|
|
|
/** |
238
|
|
|
* Function to retrieve the name in Estonian. |
239
|
|
|
* |
240
|
|
|
* @return string |
241
|
|
|
*/ |
242
|
|
|
public function inEstonian() : string |
243
|
|
|
{ |
244
|
|
|
return $this->getName('et'); |
|
|
|
|
245
|
|
|
} |
246
|
|
|
|
247
|
|
|
/** |
248
|
|
|
* Function to retrieve the name in Filipino. |
249
|
|
|
* |
250
|
|
|
* @return string |
251
|
|
|
*/ |
252
|
|
|
public function inFilipino() : string |
253
|
|
|
{ |
254
|
|
|
return $this->getName('tl'); |
|
|
|
|
255
|
|
|
} |
256
|
|
|
|
257
|
|
|
/** |
258
|
|
|
* Function to retrieve the name in Finnish. |
259
|
|
|
* |
260
|
|
|
* @return string |
261
|
|
|
*/ |
262
|
|
|
public function inFinnish() : string |
263
|
|
|
{ |
264
|
|
|
return $this->getName('fi'); |
|
|
|
|
265
|
|
|
} |
266
|
|
|
|
267
|
|
|
/** |
268
|
|
|
* Function to retrieve the name in French. |
269
|
|
|
* |
270
|
|
|
* @return string |
271
|
|
|
*/ |
272
|
|
|
public function inFrench() : string |
273
|
|
|
{ |
274
|
|
|
return $this->getName('fr'); |
|
|
|
|
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* Function to retrieve the name in Frisian. |
279
|
|
|
* |
280
|
|
|
* @return string |
281
|
|
|
*/ |
282
|
|
|
public function inFrisian() : string |
283
|
|
|
{ |
284
|
|
|
return $this->getName('fy'); |
|
|
|
|
285
|
|
|
} |
286
|
|
|
|
287
|
|
|
/** |
288
|
|
|
* Function to retrieve the name in Galician. |
289
|
|
|
* |
290
|
|
|
* @return string |
291
|
|
|
*/ |
292
|
|
|
public function inGalician() : string |
293
|
|
|
{ |
294
|
|
|
return $this->getName('gl'); |
|
|
|
|
295
|
|
|
} |
296
|
|
|
|
297
|
|
|
/** |
298
|
|
|
* Function to retrieve the name in Georgian. |
299
|
|
|
* |
300
|
|
|
* @return string |
301
|
|
|
*/ |
302
|
|
|
public function inGeorgian() : string |
303
|
|
|
{ |
304
|
|
|
return $this->getName('ka'); |
|
|
|
|
305
|
|
|
} |
306
|
|
|
|
307
|
|
|
/** |
308
|
|
|
* Function to retrieve the name in German. |
309
|
|
|
* |
310
|
|
|
* @return string |
311
|
|
|
*/ |
312
|
|
|
public function inGerman() : string |
313
|
|
|
{ |
314
|
|
|
return $this->getName('de'); |
|
|
|
|
315
|
|
|
} |
316
|
|
|
|
317
|
|
|
/** |
318
|
|
|
* Function to retrieve the name in Greek. |
319
|
|
|
* |
320
|
|
|
* @return string |
321
|
|
|
*/ |
322
|
|
|
public function inGreek() : string |
323
|
|
|
{ |
324
|
|
|
return $this->getName('el'); |
|
|
|
|
325
|
|
|
} |
326
|
|
|
|
327
|
|
|
/** |
328
|
|
|
* Function to retrieve the name in Gujarati. |
329
|
|
|
* |
330
|
|
|
* @return string |
331
|
|
|
*/ |
332
|
|
|
public function inGujarati() : string |
333
|
|
|
{ |
334
|
|
|
return $this->getName('gu'); |
|
|
|
|
335
|
|
|
} |
336
|
|
|
|
337
|
|
|
/** |
338
|
|
|
* Function to retrieve the name in Haitian Creole. |
339
|
|
|
* |
340
|
|
|
* @return string |
341
|
|
|
*/ |
342
|
|
|
public function inHaitianCreole() : string |
343
|
|
|
{ |
344
|
|
|
return $this->getName('ht'); |
|
|
|
|
345
|
|
|
} |
346
|
|
|
|
347
|
|
|
/** |
348
|
|
|
* Function to retrieve the name in Hausa. |
349
|
|
|
* |
350
|
|
|
* @return string |
351
|
|
|
*/ |
352
|
|
|
public function inHausa() : string |
353
|
|
|
{ |
354
|
|
|
return $this->getName('ha'); |
|
|
|
|
355
|
|
|
} |
356
|
|
|
|
357
|
|
|
/** |
358
|
|
|
* Function to retrieve the name in Hawaiian. |
359
|
|
|
* |
360
|
|
|
* @return string |
361
|
|
|
*/ |
362
|
|
|
public function inHawaiian() : string |
363
|
|
|
{ |
364
|
|
|
return $this->getName('haw'); |
|
|
|
|
365
|
|
|
} |
366
|
|
|
|
367
|
|
|
/** |
368
|
|
|
* Function to retrieve the name in Hebrew. |
369
|
|
|
* |
370
|
|
|
* @return string |
371
|
|
|
*/ |
372
|
|
|
public function inHebrew() : string |
373
|
|
|
{ |
374
|
|
|
return $this->getName('iw'); |
|
|
|
|
375
|
|
|
} |
376
|
|
|
|
377
|
|
|
/** |
378
|
|
|
* Function to retrieve the name in Hindi. |
379
|
|
|
* |
380
|
|
|
* @return string |
381
|
|
|
*/ |
382
|
|
|
public function inHindi() : string |
383
|
|
|
{ |
384
|
|
|
return $this->getName('hi'); |
|
|
|
|
385
|
|
|
} |
386
|
|
|
|
387
|
|
|
/** |
388
|
|
|
* Function to retrieve the name in Hmong. |
389
|
|
|
* |
390
|
|
|
* @return string |
391
|
|
|
*/ |
392
|
|
|
public function inHmong() : string |
393
|
|
|
{ |
394
|
|
|
return $this->getName('hmn'); |
|
|
|
|
395
|
|
|
} |
396
|
|
|
|
397
|
|
|
/** |
398
|
|
|
* Function to retrieve the name in Hungarian. |
399
|
|
|
* |
400
|
|
|
* @return string |
401
|
|
|
*/ |
402
|
|
|
public function inHungarian() : string |
403
|
|
|
{ |
404
|
|
|
return $this->getName('hu'); |
|
|
|
|
405
|
|
|
} |
406
|
|
|
|
407
|
|
|
/** |
408
|
|
|
* Function to retrieve the name in Icelandic. |
409
|
|
|
* |
410
|
|
|
* @return string |
411
|
|
|
*/ |
412
|
|
|
public function inIcelandic() : string |
413
|
|
|
{ |
414
|
|
|
return $this->getName('is'); |
|
|
|
|
415
|
|
|
} |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* Function to retrieve the name in Igbo. |
419
|
|
|
* |
420
|
|
|
* @return string |
421
|
|
|
*/ |
422
|
|
|
public function inIgbo() : string |
423
|
|
|
{ |
424
|
|
|
return $this->getName('ig'); |
|
|
|
|
425
|
|
|
} |
426
|
|
|
|
427
|
|
|
/** |
428
|
|
|
* Function to retrieve the name in Indonesian. |
429
|
|
|
* |
430
|
|
|
* @return string |
431
|
|
|
*/ |
432
|
|
|
public function inIndonesian() : string |
433
|
|
|
{ |
434
|
|
|
return $this->getName('id'); |
|
|
|
|
435
|
|
|
} |
436
|
|
|
|
437
|
|
|
/** |
438
|
|
|
* Function to retrieve the name in Irish. |
439
|
|
|
* |
440
|
|
|
* @return string |
441
|
|
|
*/ |
442
|
|
|
public function inIrish() : string |
443
|
|
|
{ |
444
|
|
|
return $this->getName('ga'); |
|
|
|
|
445
|
|
|
} |
446
|
|
|
|
447
|
|
|
/** |
448
|
|
|
* Function to retrieve the name in Italian. |
449
|
|
|
* |
450
|
|
|
* @return string |
451
|
|
|
*/ |
452
|
|
|
public function inItalian() : string |
453
|
|
|
{ |
454
|
|
|
return $this->getName('it'); |
|
|
|
|
455
|
|
|
} |
456
|
|
|
|
457
|
|
|
/** |
458
|
|
|
* Function to retrieve the name in Japanese. |
459
|
|
|
* |
460
|
|
|
* @return string |
461
|
|
|
*/ |
462
|
|
|
public function inJapanese() : string |
463
|
|
|
{ |
464
|
|
|
return $this->getName('ja'); |
|
|
|
|
465
|
|
|
} |
466
|
|
|
|
467
|
|
|
/** |
468
|
|
|
* Function to retrieve the name in Javanese. |
469
|
|
|
* |
470
|
|
|
* @return string |
471
|
|
|
*/ |
472
|
|
|
public function inJavanese() : string |
473
|
|
|
{ |
474
|
|
|
return $this->getName('jw'); |
|
|
|
|
475
|
|
|
} |
476
|
|
|
|
477
|
|
|
/** |
478
|
|
|
* Function to retrieve the name in Kannada. |
479
|
|
|
* |
480
|
|
|
* @return string |
481
|
|
|
*/ |
482
|
|
|
public function inKannada() : string |
483
|
|
|
{ |
484
|
|
|
return $this->getName('kn'); |
|
|
|
|
485
|
|
|
} |
486
|
|
|
|
487
|
|
|
/** |
488
|
|
|
* Function to retrieve the name in Kazakh. |
489
|
|
|
* |
490
|
|
|
* @return string |
491
|
|
|
*/ |
492
|
|
|
public function inKazakh() : string |
493
|
|
|
{ |
494
|
|
|
return $this->getName('kk'); |
|
|
|
|
495
|
|
|
} |
496
|
|
|
|
497
|
|
|
/** |
498
|
|
|
* Function to retrieve the name in Khmer. |
499
|
|
|
* |
500
|
|
|
* @return string |
501
|
|
|
*/ |
502
|
|
|
public function inKhmer() : string |
503
|
|
|
{ |
504
|
|
|
return $this->getName('km'); |
|
|
|
|
505
|
|
|
} |
506
|
|
|
|
507
|
|
|
/** |
508
|
|
|
* Function to retrieve the name in Korean. |
509
|
|
|
* |
510
|
|
|
* @return string |
511
|
|
|
*/ |
512
|
|
|
public function inKorean() : string |
513
|
|
|
{ |
514
|
|
|
return $this->getName('ko'); |
|
|
|
|
515
|
|
|
} |
516
|
|
|
|
517
|
|
|
/** |
518
|
|
|
* Function to retrieve the name in Kurdish (Kurmanji). |
519
|
|
|
* |
520
|
|
|
* @return string |
521
|
|
|
*/ |
522
|
|
|
public function inKurmanjiKurdish() : string |
523
|
|
|
{ |
524
|
|
|
return $this->getName('ku'); |
|
|
|
|
525
|
|
|
} |
526
|
|
|
|
527
|
|
|
/** |
528
|
|
|
* Function to retrieve the name in Kyrgyz. |
529
|
|
|
* |
530
|
|
|
* @return string |
531
|
|
|
*/ |
532
|
|
|
public function inKyrgyz() : string |
533
|
|
|
{ |
534
|
|
|
return $this->getName('ky'); |
|
|
|
|
535
|
|
|
} |
536
|
|
|
|
537
|
|
|
/** |
538
|
|
|
* Function to retrieve the name in Lao. |
539
|
|
|
* |
540
|
|
|
* @return string |
541
|
|
|
*/ |
542
|
|
|
public function inLao() : string |
543
|
|
|
{ |
544
|
|
|
return $this->getName('lo'); |
|
|
|
|
545
|
|
|
} |
546
|
|
|
|
547
|
|
|
/** |
548
|
|
|
* Function to retrieve the name in Latin. |
549
|
|
|
* |
550
|
|
|
* @return string |
551
|
|
|
*/ |
552
|
|
|
public function inLatin() : string |
553
|
|
|
{ |
554
|
|
|
return $this->getName('la'); |
|
|
|
|
555
|
|
|
} |
556
|
|
|
|
557
|
|
|
/** |
558
|
|
|
* Function to retrieve the name in Latvian. |
559
|
|
|
* |
560
|
|
|
* @return string |
561
|
|
|
*/ |
562
|
|
|
public function inLatvian() : string |
563
|
|
|
{ |
564
|
|
|
return $this->getName('lv'); |
|
|
|
|
565
|
|
|
} |
566
|
|
|
|
567
|
|
|
/** |
568
|
|
|
* Function to retrieve the name in Lithuanian. |
569
|
|
|
* |
570
|
|
|
* @return string |
571
|
|
|
*/ |
572
|
|
|
public function inLithuanian() : string |
573
|
|
|
{ |
574
|
|
|
return $this->getName('lt'); |
|
|
|
|
575
|
|
|
} |
576
|
|
|
|
577
|
|
|
/** |
578
|
|
|
* Function to retrieve the name in Luxembourgish. |
579
|
|
|
* |
580
|
|
|
* @return string |
581
|
|
|
*/ |
582
|
|
|
public function inLuxembourgish() : string |
583
|
|
|
{ |
584
|
|
|
return $this->getName('lb'); |
|
|
|
|
585
|
|
|
} |
586
|
|
|
|
587
|
|
|
/** |
588
|
|
|
* Function to retrieve the name in Macedonian. |
589
|
|
|
* |
590
|
|
|
* @return string |
591
|
|
|
*/ |
592
|
|
|
public function inMacedonian() : string |
593
|
|
|
{ |
594
|
|
|
return $this->getName('mk'); |
|
|
|
|
595
|
|
|
} |
596
|
|
|
|
597
|
|
|
/** |
598
|
|
|
* Function to retrieve the name in Malagasy. |
599
|
|
|
* |
600
|
|
|
* @return string |
601
|
|
|
*/ |
602
|
|
|
public function inMalagasy() : string |
603
|
|
|
{ |
604
|
|
|
return $this->getName('mg'); |
|
|
|
|
605
|
|
|
} |
606
|
|
|
|
607
|
|
|
/** |
608
|
|
|
* Function to retrieve the name in Malay. |
609
|
|
|
* |
610
|
|
|
* @return string |
611
|
|
|
*/ |
612
|
|
|
public function inMalay() : string |
613
|
|
|
{ |
614
|
|
|
return $this->getName('ms'); |
|
|
|
|
615
|
|
|
} |
616
|
|
|
|
617
|
|
|
/** |
618
|
|
|
* Function to retrieve the name in Malayalam. |
619
|
|
|
* |
620
|
|
|
* @return string |
621
|
|
|
*/ |
622
|
|
|
public function inMalayalam() : string |
623
|
|
|
{ |
624
|
|
|
return $this->getName('ml'); |
|
|
|
|
625
|
|
|
} |
626
|
|
|
|
627
|
|
|
/** |
628
|
|
|
* Function to retrieve the name in Maltese. |
629
|
|
|
* |
630
|
|
|
* @return string |
631
|
|
|
*/ |
632
|
|
|
public function inMaltese() : string |
633
|
|
|
{ |
634
|
|
|
return $this->getName('mt'); |
|
|
|
|
635
|
|
|
} |
636
|
|
|
|
637
|
|
|
/** |
638
|
|
|
* Function to retrieve the name in Maori. |
639
|
|
|
* |
640
|
|
|
* @return string |
641
|
|
|
*/ |
642
|
|
|
public function inMaori() : string |
643
|
|
|
{ |
644
|
|
|
return $this->getName('mi'); |
|
|
|
|
645
|
|
|
} |
646
|
|
|
|
647
|
|
|
/** |
648
|
|
|
* Function to retrieve the name in Marathi. |
649
|
|
|
* |
650
|
|
|
* @return string |
651
|
|
|
*/ |
652
|
|
|
public function inMarathi() : string |
653
|
|
|
{ |
654
|
|
|
return $this->getName('mr'); |
|
|
|
|
655
|
|
|
} |
656
|
|
|
|
657
|
|
|
/** |
658
|
|
|
* Function to retrieve the name in Mongolian. |
659
|
|
|
* |
660
|
|
|
* @return string |
661
|
|
|
*/ |
662
|
|
|
public function inMongolian() : string |
663
|
|
|
{ |
664
|
|
|
return $this->getName('mn'); |
|
|
|
|
665
|
|
|
} |
666
|
|
|
|
667
|
|
|
/** |
668
|
|
|
* Function to retrieve the name in Myanmar (Burmese). |
669
|
|
|
* |
670
|
|
|
* @return string |
671
|
|
|
*/ |
672
|
|
|
public function inBurmeseMyanmar() : string |
673
|
|
|
{ |
674
|
|
|
return $this->getName('my'); |
|
|
|
|
675
|
|
|
} |
676
|
|
|
|
677
|
|
|
/** |
678
|
|
|
* Function to retrieve the name in Nepali. |
679
|
|
|
* |
680
|
|
|
* @return string |
681
|
|
|
*/ |
682
|
|
|
public function inNepali() : string |
683
|
|
|
{ |
684
|
|
|
return $this->getName('ne'); |
|
|
|
|
685
|
|
|
} |
686
|
|
|
|
687
|
|
|
/** |
688
|
|
|
* Function to retrieve the name in Norwegian. |
689
|
|
|
* |
690
|
|
|
* @return string |
691
|
|
|
*/ |
692
|
|
|
public function inNorwegian() : string |
693
|
|
|
{ |
694
|
|
|
return $this->getName('no'); |
|
|
|
|
695
|
|
|
} |
696
|
|
|
|
697
|
|
|
/** |
698
|
|
|
* Function to retrieve the name in Pashto. |
699
|
|
|
* |
700
|
|
|
* @return string |
701
|
|
|
*/ |
702
|
|
|
public function inPashto() : string |
703
|
|
|
{ |
704
|
|
|
return $this->getName('ps'); |
|
|
|
|
705
|
|
|
} |
706
|
|
|
|
707
|
|
|
/** |
708
|
|
|
* Function to retrieve the name in Persian. |
709
|
|
|
* |
710
|
|
|
* @return string |
711
|
|
|
*/ |
712
|
|
|
public function inPersian() : string |
713
|
|
|
{ |
714
|
|
|
return $this->getName('fa'); |
|
|
|
|
715
|
|
|
} |
716
|
|
|
|
717
|
|
|
/** |
718
|
|
|
* Function to retrieve the name in Polish. |
719
|
|
|
* |
720
|
|
|
* @return string |
721
|
|
|
*/ |
722
|
|
|
public function inPolish() : string |
723
|
|
|
{ |
724
|
|
|
return $this->getName('pl'); |
|
|
|
|
725
|
|
|
} |
726
|
|
|
|
727
|
|
|
/** |
728
|
|
|
* Function to retrieve the name in Portuguese. |
729
|
|
|
* |
730
|
|
|
* @return string |
731
|
|
|
*/ |
732
|
|
|
public function inPortuguese() : string |
733
|
|
|
{ |
734
|
|
|
return $this->getName('pt'); |
|
|
|
|
735
|
|
|
} |
736
|
|
|
|
737
|
|
|
/** |
738
|
|
|
* Function to retrieve the name in Punjabi. |
739
|
|
|
* |
740
|
|
|
* @return string |
741
|
|
|
*/ |
742
|
|
|
public function inPunjabi() : string |
743
|
|
|
{ |
744
|
|
|
return $this->getName('pa'); |
|
|
|
|
745
|
|
|
} |
746
|
|
|
|
747
|
|
|
/** |
748
|
|
|
* Function to retrieve the name in Romanian. |
749
|
|
|
* |
750
|
|
|
* @return string |
751
|
|
|
*/ |
752
|
|
|
public function inRomanian() : string |
753
|
|
|
{ |
754
|
|
|
return $this->getName('ro'); |
|
|
|
|
755
|
|
|
} |
756
|
|
|
|
757
|
|
|
/** |
758
|
|
|
* Function to retrieve the name in Russian. |
759
|
|
|
* |
760
|
|
|
* @return string |
761
|
|
|
*/ |
762
|
|
|
public function inRussian() : string |
763
|
|
|
{ |
764
|
|
|
return $this->getName('ru'); |
|
|
|
|
765
|
|
|
} |
766
|
|
|
|
767
|
|
|
/** |
768
|
|
|
* Function to retrieve the name in Samoan. |
769
|
|
|
* |
770
|
|
|
* @return string |
771
|
|
|
*/ |
772
|
|
|
public function inSamoan() : string |
773
|
|
|
{ |
774
|
|
|
return $this->getName('sm'); |
|
|
|
|
775
|
|
|
} |
776
|
|
|
|
777
|
|
|
/** |
778
|
|
|
* Function to retrieve the name in Scots Gaelic. |
779
|
|
|
* |
780
|
|
|
* @return string |
781
|
|
|
*/ |
782
|
|
|
public function inScotsGaelic() : string |
783
|
|
|
{ |
784
|
|
|
return $this->getName('gd'); |
|
|
|
|
785
|
|
|
} |
786
|
|
|
|
787
|
|
|
/** |
788
|
|
|
* Function to retrieve the name in Serbian. |
789
|
|
|
* |
790
|
|
|
* @return string |
791
|
|
|
*/ |
792
|
|
|
public function inSerbian() : string |
793
|
|
|
{ |
794
|
|
|
return $this->getName('sr'); |
|
|
|
|
795
|
|
|
} |
796
|
|
|
|
797
|
|
|
/** |
798
|
|
|
* Function to retrieve the name in Sesotho. |
799
|
|
|
* |
800
|
|
|
* @return string |
801
|
|
|
*/ |
802
|
|
|
public function inSesotho() : string |
803
|
|
|
{ |
804
|
|
|
return $this->getName('st'); |
|
|
|
|
805
|
|
|
} |
806
|
|
|
|
807
|
|
|
/** |
808
|
|
|
* Function to retrieve the name in Shona. |
809
|
|
|
* |
810
|
|
|
* @return string |
811
|
|
|
*/ |
812
|
|
|
public function inShona() : string |
813
|
|
|
{ |
814
|
|
|
return $this->getName('sn'); |
|
|
|
|
815
|
|
|
} |
816
|
|
|
|
817
|
|
|
/** |
818
|
|
|
* Function to retrieve the name in Sindhi. |
819
|
|
|
* |
820
|
|
|
* @return string |
821
|
|
|
*/ |
822
|
|
|
public function inSindhi() : string |
823
|
|
|
{ |
824
|
|
|
return $this->getName('sd'); |
|
|
|
|
825
|
|
|
} |
826
|
|
|
|
827
|
|
|
/** |
828
|
|
|
* Function to retrieve the name in Sinhala. |
829
|
|
|
* |
830
|
|
|
* @return string |
831
|
|
|
*/ |
832
|
|
|
public function inSinhala() : string |
833
|
|
|
{ |
834
|
|
|
return $this->getName('si'); |
|
|
|
|
835
|
|
|
} |
836
|
|
|
|
837
|
|
|
/** |
838
|
|
|
* Function to retrieve the name in Slovak. |
839
|
|
|
* |
840
|
|
|
* @return string |
841
|
|
|
*/ |
842
|
|
|
public function inSlovak() : string |
843
|
|
|
{ |
844
|
|
|
return $this->getName('sk'); |
|
|
|
|
845
|
|
|
} |
846
|
|
|
|
847
|
|
|
/** |
848
|
|
|
* Function to retrieve the name in Slovenian. |
849
|
|
|
* |
850
|
|
|
* @return string |
851
|
|
|
*/ |
852
|
|
|
public function inSlovenian() : string |
853
|
|
|
{ |
854
|
|
|
return $this->getName('sl'); |
|
|
|
|
855
|
|
|
} |
856
|
|
|
|
857
|
|
|
/** |
858
|
|
|
* Function to retrieve the name in Somali. |
859
|
|
|
* |
860
|
|
|
* @return string |
861
|
|
|
*/ |
862
|
|
|
public function inSomali() : string |
863
|
|
|
{ |
864
|
|
|
return $this->getName('so'); |
|
|
|
|
865
|
|
|
} |
866
|
|
|
|
867
|
|
|
/** |
868
|
|
|
* Function to retrieve the name in Spanish. |
869
|
|
|
* |
870
|
|
|
* @return string |
871
|
|
|
*/ |
872
|
|
|
public function inSpanish() : string |
873
|
|
|
{ |
874
|
|
|
return $this->getName('es'); |
|
|
|
|
875
|
|
|
} |
876
|
|
|
|
877
|
|
|
/** |
878
|
|
|
* Function to retrieve the name in Sundanese. |
879
|
|
|
* |
880
|
|
|
* @return string |
881
|
|
|
*/ |
882
|
|
|
public function inSundanese() : string |
883
|
|
|
{ |
884
|
|
|
return $this->getName('su'); |
|
|
|
|
885
|
|
|
} |
886
|
|
|
|
887
|
|
|
/** |
888
|
|
|
* Function to retrieve the name in Swahili. |
889
|
|
|
* |
890
|
|
|
* @return string |
891
|
|
|
*/ |
892
|
|
|
public function inSwahili() : string |
893
|
|
|
{ |
894
|
|
|
return $this->getName('sw'); |
|
|
|
|
895
|
|
|
} |
896
|
|
|
|
897
|
|
|
/** |
898
|
|
|
* Function to retrieve the name in Swedish. |
899
|
|
|
* |
900
|
|
|
* @return string |
901
|
|
|
*/ |
902
|
|
|
public function inSwedish() : string |
903
|
|
|
{ |
904
|
|
|
return $this->getName('sv'); |
|
|
|
|
905
|
|
|
} |
906
|
|
|
|
907
|
|
|
/** |
908
|
|
|
* Function to retrieve the name in Tajik. |
909
|
|
|
* |
910
|
|
|
* @return string |
911
|
|
|
*/ |
912
|
|
|
public function inTajik() : string |
913
|
|
|
{ |
914
|
|
|
return $this->getName('tg'); |
|
|
|
|
915
|
|
|
} |
916
|
|
|
|
917
|
|
|
/** |
918
|
|
|
* Function to retrieve the name in Tamil. |
919
|
|
|
* |
920
|
|
|
* @return string |
921
|
|
|
*/ |
922
|
|
|
public function inTamil() : string |
923
|
|
|
{ |
924
|
|
|
return $this->getName('ta'); |
|
|
|
|
925
|
|
|
} |
926
|
|
|
|
927
|
|
|
/** |
928
|
|
|
* Function to retrieve the name in Telugu. |
929
|
|
|
* |
930
|
|
|
* @return string |
931
|
|
|
*/ |
932
|
|
|
public function inTelugu() : string |
933
|
|
|
{ |
934
|
|
|
return $this->getName('te'); |
|
|
|
|
935
|
|
|
} |
936
|
|
|
|
937
|
|
|
/** |
938
|
|
|
* Function to retrieve the name in Thai. |
939
|
|
|
* |
940
|
|
|
* @return string |
941
|
|
|
*/ |
942
|
|
|
public function inThai() : string |
943
|
|
|
{ |
944
|
|
|
return $this->getName('th'); |
|
|
|
|
945
|
|
|
} |
946
|
|
|
|
947
|
|
|
/** |
948
|
|
|
* Function to retrieve the name in Turkish. |
949
|
|
|
* |
950
|
|
|
* @return string |
951
|
|
|
*/ |
952
|
|
|
public function inTurkish() : string |
953
|
|
|
{ |
954
|
|
|
return $this->getName('tr'); |
|
|
|
|
955
|
|
|
} |
956
|
|
|
|
957
|
|
|
/** |
958
|
|
|
* Function to retrieve the name in Ukrainian. |
959
|
|
|
* |
960
|
|
|
* @return string |
961
|
|
|
*/ |
962
|
|
|
public function inUkrainian() : string |
963
|
|
|
{ |
964
|
|
|
return $this->getName('uk'); |
|
|
|
|
965
|
|
|
} |
966
|
|
|
|
967
|
|
|
/** |
968
|
|
|
* Function to retrieve the name in Urdu. |
969
|
|
|
* |
970
|
|
|
* @return string |
971
|
|
|
*/ |
972
|
|
|
public function inUrdu() : string |
973
|
|
|
{ |
974
|
|
|
return $this->getName('ur'); |
|
|
|
|
975
|
|
|
} |
976
|
|
|
|
977
|
|
|
/** |
978
|
|
|
* Function to retrieve the name in Uzbek. |
979
|
|
|
* |
980
|
|
|
* @return string |
981
|
|
|
*/ |
982
|
|
|
public function inUzbek() : string |
983
|
|
|
{ |
984
|
|
|
return $this->getName('uz'); |
|
|
|
|
985
|
|
|
} |
986
|
|
|
|
987
|
|
|
/** |
988
|
|
|
* Function to retrieve the name in Vietnamese. |
989
|
|
|
* |
990
|
|
|
* @return string |
991
|
|
|
*/ |
992
|
|
|
public function inVietnamese() : string |
993
|
|
|
{ |
994
|
|
|
return $this->getName('vi'); |
|
|
|
|
995
|
|
|
} |
996
|
|
|
|
997
|
|
|
/** |
998
|
|
|
* Function to retrieve the name in Welsh. |
999
|
|
|
* |
1000
|
|
|
* @return string |
1001
|
|
|
*/ |
1002
|
|
|
public function inWelsh() : string |
1003
|
|
|
{ |
1004
|
|
|
return $this->getName('cy'); |
|
|
|
|
1005
|
|
|
} |
1006
|
|
|
|
1007
|
|
|
/** |
1008
|
|
|
* Function to retrieve the name in Xhosa. |
1009
|
|
|
* |
1010
|
|
|
* @return string |
1011
|
|
|
*/ |
1012
|
|
|
public function inXhosa() : string |
1013
|
|
|
{ |
1014
|
|
|
return $this->getName('xh'); |
|
|
|
|
1015
|
|
|
} |
1016
|
|
|
|
1017
|
|
|
/** |
1018
|
|
|
* Function to retrieve the name in Yiddish. |
1019
|
|
|
* |
1020
|
|
|
* @return string |
1021
|
|
|
*/ |
1022
|
|
|
public function inYiddish() : string |
1023
|
|
|
{ |
1024
|
|
|
return $this->getName('yi'); |
|
|
|
|
1025
|
|
|
} |
1026
|
|
|
|
1027
|
|
|
/** |
1028
|
|
|
* Function to retrieve the name in Yoruba. |
1029
|
|
|
* |
1030
|
|
|
* @return string |
1031
|
|
|
*/ |
1032
|
|
|
public function inYoruba() : string |
1033
|
|
|
{ |
1034
|
|
|
return $this->getName('yo'); |
|
|
|
|
1035
|
|
|
} |
1036
|
|
|
|
1037
|
|
|
/** |
1038
|
|
|
* Function to retrieve the name in Zulu. |
1039
|
|
|
* |
1040
|
|
|
* @return string |
1041
|
|
|
*/ |
1042
|
|
|
public function inZulu() : string |
1043
|
|
|
{ |
1044
|
|
|
return $this->getName('zu'); |
|
|
|
|
1045
|
|
|
} |
1046
|
|
|
} |
1047
|
|
|
|
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idable
provides a methodequalsId
that in turn relies on the methodgetId()
. If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()
as an abstract method to the trait will make sure it is available.