Complex classes like PhpWeekday often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use PhpWeekday, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 7 | class PhpWeekday |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The locale of the application. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $locale; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The name of the weekday. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $name; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The value of the weekday. |
||
| 25 | * |
||
| 26 | * @var int |
||
| 27 | */ |
||
| 28 | protected $value; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Constructor of the class. |
||
| 32 | * |
||
| 33 | * @param string|int $value |
||
| 34 | * @param string $locale |
||
| 35 | * @return self |
||
|
|
|||
| 36 | */ |
||
| 37 | public function __construct($value, string $locale) |
||
| 38 | { |
||
| 39 | $this->setLocale($locale) |
||
| 40 | ->set($value); |
||
| 41 | |||
| 42 | return $this; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Retrieve the current locale. |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public function getLocale() : string |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Retrieve the supported locales. |
||
| 57 | * |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | public static function getLocales() : array |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Retrieve the name of the weekday. |
||
| 70 | * |
||
| 71 | * @param string $locale |
||
| 72 | * @return string |
||
| 73 | */ |
||
| 74 | public function getName(string $locale = null) : string |
||
| 86 | |||
| 87 | /** |
||
| 88 | * Retrieve the name from a value. |
||
| 89 | * |
||
| 90 | * @param int $value |
||
| 91 | * @param string $locale |
||
| 92 | * @return string |
||
| 93 | */ |
||
| 94 | public static function getNameFromValue(int $value, string $locale) : string |
||
| 98 | |||
| 99 | /** |
||
| 100 | * Retrieve the names of every weekday for a locale. |
||
| 101 | * |
||
| 102 | * @param string $locale |
||
| 103 | * @return array |
||
| 104 | */ |
||
| 105 | public static function getNames(string $locale) : array |
||
| 115 | |||
| 116 | /** |
||
| 117 | * Retrieve the value of the weekday. |
||
| 118 | * |
||
| 119 | * @return int |
||
| 120 | */ |
||
| 121 | public function getValue() : int |
||
| 129 | |||
| 130 | /** |
||
| 131 | * Retrieve the value from a name. |
||
| 132 | * |
||
| 133 | * @param string $name |
||
| 134 | * @param string $locale |
||
| 135 | * @return string |
||
| 136 | */ |
||
| 137 | public static function getValueFromName(string $name, string $locale) : string |
||
| 141 | |||
| 142 | /** |
||
| 143 | * Check if the locale is supported. |
||
| 144 | * |
||
| 145 | * @param string $locale |
||
| 146 | * @return bool |
||
| 147 | */ |
||
| 148 | public function isSupported(string $locale) : bool |
||
| 152 | |||
| 153 | /** |
||
| 154 | * Check if the locale is not supported. |
||
| 155 | * |
||
| 156 | * @param string $locale |
||
| 157 | * @return bool |
||
| 158 | */ |
||
| 159 | public function isNotSupported(string $locale) : bool |
||
| 163 | |||
| 164 | /** |
||
| 165 | * Create a new instance from a value. |
||
| 166 | * |
||
| 167 | * @param string|int $value |
||
| 168 | * @param string $locale |
||
| 169 | * @return self |
||
| 170 | */ |
||
| 171 | public static function parse($value, string $locale) |
||
| 175 | |||
| 176 | /** |
||
| 177 | * Parse the name of the weekday based on the value. |
||
| 178 | * |
||
| 179 | * @param int $value |
||
| 180 | * @param string $locale |
||
| 181 | * @return string |
||
| 182 | */ |
||
| 183 | public function parseName(int $value, string $locale = null) : string |
||
| 193 | |||
| 194 | /** |
||
| 195 | * Parse the value from the weekday name. |
||
| 196 | * |
||
| 197 | * @param string $name |
||
| 198 | * @param string $locale |
||
| 199 | * @return int |
||
| 200 | */ |
||
| 201 | public function parseValue(string $name, string $locale = null) : int |
||
| 225 | |||
| 226 | /** |
||
| 227 | * Set the weekday based on the integer or string value. |
||
| 228 | * |
||
| 229 | * @param string|int $value |
||
| 230 | * @return self |
||
| 231 | */ |
||
| 232 | public function set($value) : self |
||
| 244 | |||
| 245 | /** |
||
| 246 | * Set the locale of the instance. |
||
| 247 | * |
||
| 248 | * @param string $locale |
||
| 249 | * @return self |
||
| 250 | */ |
||
| 251 | public function setLocale(string $locale) : self |
||
| 264 | |||
| 265 | /** |
||
| 266 | * Throw an exception to let the user know that the locale is not yet |
||
| 267 | * supported. |
||
| 268 | * |
||
| 269 | * @param string $locale |
||
| 270 | * @return void |
||
| 271 | */ |
||
| 272 | protected static function throwNotSupportedLocaleException(string $locale) : void |
||
| 278 | |||
| 279 | /** |
||
| 280 | * Function to retrieve the name in Afrikaans. |
||
| 281 | * |
||
| 282 | * @return string |
||
| 283 | */ |
||
| 284 | public function inAfrikaans() : string |
||
| 288 | |||
| 289 | /** |
||
| 290 | * Function to retrieve the name in Albanian. |
||
| 291 | * |
||
| 292 | * @return string |
||
| 293 | */ |
||
| 294 | public function inAlbanian() : string |
||
| 298 | |||
| 299 | /** |
||
| 300 | * Function to retrieve the name in Amharic. |
||
| 301 | * |
||
| 302 | * @return string |
||
| 303 | */ |
||
| 304 | public function inAmharic() : string |
||
| 308 | |||
| 309 | /** |
||
| 310 | * Function to retrieve the name in Arabic. |
||
| 311 | * |
||
| 312 | * @return string |
||
| 313 | */ |
||
| 314 | public function inArabic() : string |
||
| 318 | |||
| 319 | /** |
||
| 320 | * Function to retrieve the name in Armenian. |
||
| 321 | * |
||
| 322 | * @return string |
||
| 323 | */ |
||
| 324 | public function inArmenian() : string |
||
| 328 | |||
| 329 | /** |
||
| 330 | * Function to retrieve the name in Azerbaijani. |
||
| 331 | * |
||
| 332 | * @return string |
||
| 333 | */ |
||
| 334 | public function inAzerbaijani() : string |
||
| 338 | |||
| 339 | /** |
||
| 340 | * Function to retrieve the name in Basque. |
||
| 341 | * |
||
| 342 | * @return string |
||
| 343 | */ |
||
| 344 | public function inBasque() : string |
||
| 348 | |||
| 349 | /** |
||
| 350 | * Function to retrieve the name in Belarusian. |
||
| 351 | * |
||
| 352 | * @return string |
||
| 353 | */ |
||
| 354 | public function inBelarusian() : string |
||
| 358 | |||
| 359 | /** |
||
| 360 | * Function to retrieve the name in Bengali. |
||
| 361 | * |
||
| 362 | * @return string |
||
| 363 | */ |
||
| 364 | public function inBengali() : string |
||
| 368 | |||
| 369 | /** |
||
| 370 | * Function to retrieve the name in Bosnian. |
||
| 371 | * |
||
| 372 | * @return string |
||
| 373 | */ |
||
| 374 | public function inBosnian() : string |
||
| 378 | |||
| 379 | /** |
||
| 380 | * Function to retrieve the name in Bulgarian. |
||
| 381 | * |
||
| 382 | * @return string |
||
| 383 | */ |
||
| 384 | public function inBulgarian() : string |
||
| 388 | |||
| 389 | /** |
||
| 390 | * Function to retrieve the name in Catalan. |
||
| 391 | * |
||
| 392 | * @return string |
||
| 393 | */ |
||
| 394 | public function inCatalan() : string |
||
| 398 | |||
| 399 | /** |
||
| 400 | * Function to retrieve the name in Cebuano. |
||
| 401 | * |
||
| 402 | * @return string |
||
| 403 | */ |
||
| 404 | public function inCebuano() : string |
||
| 408 | |||
| 409 | /** |
||
| 410 | * Function to retrieve the name in Chichewa. |
||
| 411 | * |
||
| 412 | * @return string |
||
| 413 | */ |
||
| 414 | public function inChichewa() : string |
||
| 418 | |||
| 419 | /** |
||
| 420 | * Function to retrieve the name in Chinese (Simplified). |
||
| 421 | * |
||
| 422 | * @return string |
||
| 423 | */ |
||
| 424 | public function inSimplifiedChinese() : string |
||
| 428 | |||
| 429 | /** |
||
| 430 | * Function to retrieve the name in Chinese (Traditional). |
||
| 431 | * |
||
| 432 | * @return string |
||
| 433 | */ |
||
| 434 | public function inTraditionalChinese() : string |
||
| 438 | |||
| 439 | /** |
||
| 440 | * Function to retrieve the name in Corsican. |
||
| 441 | * |
||
| 442 | * @return string |
||
| 443 | */ |
||
| 444 | public function inCorsican() : string |
||
| 448 | |||
| 449 | /** |
||
| 450 | * Function to retrieve the name in Croatian. |
||
| 451 | * |
||
| 452 | * @return string |
||
| 453 | */ |
||
| 454 | public function inCroatian() : string |
||
| 458 | |||
| 459 | /** |
||
| 460 | * Function to retrieve the name in Czech. |
||
| 461 | * |
||
| 462 | * @return string |
||
| 463 | */ |
||
| 464 | public function inCzech() : string |
||
| 468 | |||
| 469 | /** |
||
| 470 | * Function to retrieve the name in Danish. |
||
| 471 | * |
||
| 472 | * @return string |
||
| 473 | */ |
||
| 474 | public function inDanish() : string |
||
| 478 | |||
| 479 | /** |
||
| 480 | * Function to retrieve the name in Dutch. |
||
| 481 | * |
||
| 482 | * @return string |
||
| 483 | */ |
||
| 484 | public function inDutch() : string |
||
| 488 | |||
| 489 | /** |
||
| 490 | * Function to retrieve the name in English. |
||
| 491 | * |
||
| 492 | * @return string |
||
| 493 | */ |
||
| 494 | public function inEnglish() : string |
||
| 498 | |||
| 499 | /** |
||
| 500 | * Function to retrieve the name in Esperanto. |
||
| 501 | * |
||
| 502 | * @return string |
||
| 503 | */ |
||
| 504 | public function inEsperanto() : string |
||
| 508 | |||
| 509 | /** |
||
| 510 | * Function to retrieve the name in Estonian. |
||
| 511 | * |
||
| 512 | * @return string |
||
| 513 | */ |
||
| 514 | public function inEstonian() : string |
||
| 518 | |||
| 519 | /** |
||
| 520 | * Function to retrieve the name in Filipino. |
||
| 521 | * |
||
| 522 | * @return string |
||
| 523 | */ |
||
| 524 | public function inFilipino() : string |
||
| 528 | |||
| 529 | /** |
||
| 530 | * Function to retrieve the name in Finnish. |
||
| 531 | * |
||
| 532 | * @return string |
||
| 533 | */ |
||
| 534 | public function inFinnish() : string |
||
| 538 | |||
| 539 | /** |
||
| 540 | * Function to retrieve the name in French. |
||
| 541 | * |
||
| 542 | * @return string |
||
| 543 | */ |
||
| 544 | public function inFrench() : string |
||
| 548 | |||
| 549 | /** |
||
| 550 | * Function to retrieve the name in Frisian. |
||
| 551 | * |
||
| 552 | * @return string |
||
| 553 | */ |
||
| 554 | public function inFrisian() : string |
||
| 558 | |||
| 559 | /** |
||
| 560 | * Function to retrieve the name in Galician. |
||
| 561 | * |
||
| 562 | * @return string |
||
| 563 | */ |
||
| 564 | public function inGalician() : string |
||
| 568 | |||
| 569 | /** |
||
| 570 | * Function to retrieve the name in Georgian. |
||
| 571 | * |
||
| 572 | * @return string |
||
| 573 | */ |
||
| 574 | public function inGeorgian() : string |
||
| 578 | |||
| 579 | /** |
||
| 580 | * Function to retrieve the name in German. |
||
| 581 | * |
||
| 582 | * @return string |
||
| 583 | */ |
||
| 584 | public function inGerman() : string |
||
| 588 | |||
| 589 | /** |
||
| 590 | * Function to retrieve the name in Greek. |
||
| 591 | * |
||
| 592 | * @return string |
||
| 593 | */ |
||
| 594 | public function inGreek() : string |
||
| 598 | |||
| 599 | /** |
||
| 600 | * Function to retrieve the name in Gujarati. |
||
| 601 | * |
||
| 602 | * @return string |
||
| 603 | */ |
||
| 604 | public function inGujarati() : string |
||
| 608 | |||
| 609 | /** |
||
| 610 | * Function to retrieve the name in Haitian Creole. |
||
| 611 | * |
||
| 612 | * @return string |
||
| 613 | */ |
||
| 614 | public function inHaitianCreole() : string |
||
| 618 | |||
| 619 | /** |
||
| 620 | * Function to retrieve the name in Hausa. |
||
| 621 | * |
||
| 622 | * @return string |
||
| 623 | */ |
||
| 624 | public function inHausa() : string |
||
| 628 | |||
| 629 | /** |
||
| 630 | * Function to retrieve the name in Hawaiian. |
||
| 631 | * |
||
| 632 | * @return string |
||
| 633 | */ |
||
| 634 | public function inHawaiian() : string |
||
| 638 | |||
| 639 | /** |
||
| 640 | * Function to retrieve the name in Hebrew. |
||
| 641 | * |
||
| 642 | * @return string |
||
| 643 | */ |
||
| 644 | public function inHebrew() : string |
||
| 648 | |||
| 649 | /** |
||
| 650 | * Function to retrieve the name in Hindi. |
||
| 651 | * |
||
| 652 | * @return string |
||
| 653 | */ |
||
| 654 | public function inHindi() : string |
||
| 658 | |||
| 659 | /** |
||
| 660 | * Function to retrieve the name in Hmong. |
||
| 661 | * |
||
| 662 | * @return string |
||
| 663 | */ |
||
| 664 | public function inHmong() : string |
||
| 668 | |||
| 669 | /** |
||
| 670 | * Function to retrieve the name in Hungarian. |
||
| 671 | * |
||
| 672 | * @return string |
||
| 673 | */ |
||
| 674 | public function inHungarian() : string |
||
| 678 | |||
| 679 | /** |
||
| 680 | * Function to retrieve the name in Icelandic. |
||
| 681 | * |
||
| 682 | * @return string |
||
| 683 | */ |
||
| 684 | public function inIcelandic() : string |
||
| 688 | |||
| 689 | /** |
||
| 690 | * Function to retrieve the name in Igbo. |
||
| 691 | * |
||
| 692 | * @return string |
||
| 693 | */ |
||
| 694 | public function inIgbo() : string |
||
| 698 | |||
| 699 | /** |
||
| 700 | * Function to retrieve the name in Indonesian. |
||
| 701 | * |
||
| 702 | * @return string |
||
| 703 | */ |
||
| 704 | public function inIndonesian() : string |
||
| 708 | |||
| 709 | /** |
||
| 710 | * Function to retrieve the name in Irish. |
||
| 711 | * |
||
| 712 | * @return string |
||
| 713 | */ |
||
| 714 | public function inIrish() : string |
||
| 718 | |||
| 719 | /** |
||
| 720 | * Function to retrieve the name in Italian. |
||
| 721 | * |
||
| 722 | * @return string |
||
| 723 | */ |
||
| 724 | public function inItalian() : string |
||
| 728 | |||
| 729 | /** |
||
| 730 | * Function to retrieve the name in Japanese. |
||
| 731 | * |
||
| 732 | * @return string |
||
| 733 | */ |
||
| 734 | public function inJapanese() : string |
||
| 738 | |||
| 739 | /** |
||
| 740 | * Function to retrieve the name in Javanese. |
||
| 741 | * |
||
| 742 | * @return string |
||
| 743 | */ |
||
| 744 | public function inJavanese() : string |
||
| 748 | |||
| 749 | /** |
||
| 750 | * Function to retrieve the name in Kannada. |
||
| 751 | * |
||
| 752 | * @return string |
||
| 753 | */ |
||
| 754 | public function inKannada() : string |
||
| 758 | |||
| 759 | /** |
||
| 760 | * Function to retrieve the name in Kazakh. |
||
| 761 | * |
||
| 762 | * @return string |
||
| 763 | */ |
||
| 764 | public function inKazakh() : string |
||
| 768 | |||
| 769 | /** |
||
| 770 | * Function to retrieve the name in Khmer. |
||
| 771 | * |
||
| 772 | * @return string |
||
| 773 | */ |
||
| 774 | public function inKhmer() : string |
||
| 778 | |||
| 779 | /** |
||
| 780 | * Function to retrieve the name in Korean. |
||
| 781 | * |
||
| 782 | * @return string |
||
| 783 | */ |
||
| 784 | public function inKorean() : string |
||
| 788 | |||
| 789 | /** |
||
| 790 | * Function to retrieve the name in Kurdish (Kurmanji). |
||
| 791 | * |
||
| 792 | * @return string |
||
| 793 | */ |
||
| 794 | public function inKurmanjiKurdish() : string |
||
| 798 | |||
| 799 | /** |
||
| 800 | * Function to retrieve the name in Kyrgyz. |
||
| 801 | * |
||
| 802 | * @return string |
||
| 803 | */ |
||
| 804 | public function inKyrgyz() : string |
||
| 808 | |||
| 809 | /** |
||
| 810 | * Function to retrieve the name in Lao. |
||
| 811 | * |
||
| 812 | * @return string |
||
| 813 | */ |
||
| 814 | public function inLao() : string |
||
| 818 | |||
| 819 | /** |
||
| 820 | * Function to retrieve the name in Latin. |
||
| 821 | * |
||
| 822 | * @return string |
||
| 823 | */ |
||
| 824 | public function inLatin() : string |
||
| 828 | |||
| 829 | /** |
||
| 830 | * Function to retrieve the name in Latvian. |
||
| 831 | * |
||
| 832 | * @return string |
||
| 833 | */ |
||
| 834 | public function inLatvian() : string |
||
| 838 | |||
| 839 | /** |
||
| 840 | * Function to retrieve the name in Lithuanian. |
||
| 841 | * |
||
| 842 | * @return string |
||
| 843 | */ |
||
| 844 | public function inLithuanian() : string |
||
| 848 | |||
| 849 | /** |
||
| 850 | * Function to retrieve the name in Luxembourgish. |
||
| 851 | * |
||
| 852 | * @return string |
||
| 853 | */ |
||
| 854 | public function inLuxembourgish() : string |
||
| 858 | |||
| 859 | /** |
||
| 860 | * Function to retrieve the name in Macedonian. |
||
| 861 | * |
||
| 862 | * @return string |
||
| 863 | */ |
||
| 864 | public function inMacedonian() : string |
||
| 868 | |||
| 869 | /** |
||
| 870 | * Function to retrieve the name in Malagasy. |
||
| 871 | * |
||
| 872 | * @return string |
||
| 873 | */ |
||
| 874 | public function inMalagasy() : string |
||
| 878 | |||
| 879 | /** |
||
| 880 | * Function to retrieve the name in Malay. |
||
| 881 | * |
||
| 882 | * @return string |
||
| 883 | */ |
||
| 884 | public function inMalay() : string |
||
| 888 | |||
| 889 | /** |
||
| 890 | * Function to retrieve the name in Malayalam. |
||
| 891 | * |
||
| 892 | * @return string |
||
| 893 | */ |
||
| 894 | public function inMalayalam() : string |
||
| 898 | |||
| 899 | /** |
||
| 900 | * Function to retrieve the name in Maltese. |
||
| 901 | * |
||
| 902 | * @return string |
||
| 903 | */ |
||
| 904 | public function inMaltese() : string |
||
| 908 | |||
| 909 | /** |
||
| 910 | * Function to retrieve the name in Maori. |
||
| 911 | * |
||
| 912 | * @return string |
||
| 913 | */ |
||
| 914 | public function inMaori() : string |
||
| 918 | |||
| 919 | /** |
||
| 920 | * Function to retrieve the name in Marathi. |
||
| 921 | * |
||
| 922 | * @return string |
||
| 923 | */ |
||
| 924 | public function inMarathi() : string |
||
| 928 | |||
| 929 | /** |
||
| 930 | * Function to retrieve the name in Mongolian. |
||
| 931 | * |
||
| 932 | * @return string |
||
| 933 | */ |
||
| 934 | public function inMongolian() : string |
||
| 938 | |||
| 939 | /** |
||
| 940 | * Function to retrieve the name in Myanmar (Burmese). |
||
| 941 | * |
||
| 942 | * @return string |
||
| 943 | */ |
||
| 944 | public function inBurmeseMyanmar() : string |
||
| 948 | |||
| 949 | /** |
||
| 950 | * Function to retrieve the name in Nepali. |
||
| 951 | * |
||
| 952 | * @return string |
||
| 953 | */ |
||
| 954 | public function inNepali() : string |
||
| 958 | |||
| 959 | /** |
||
| 960 | * Function to retrieve the name in Norwegian. |
||
| 961 | * |
||
| 962 | * @return string |
||
| 963 | */ |
||
| 964 | public function inNorwegian() : string |
||
| 968 | |||
| 969 | /** |
||
| 970 | * Function to retrieve the name in Pashto. |
||
| 971 | * |
||
| 972 | * @return string |
||
| 973 | */ |
||
| 974 | public function inPashto() : string |
||
| 978 | |||
| 979 | /** |
||
| 980 | * Function to retrieve the name in Persian. |
||
| 981 | * |
||
| 982 | * @return string |
||
| 983 | */ |
||
| 984 | public function inPersian() : string |
||
| 988 | |||
| 989 | /** |
||
| 990 | * Function to retrieve the name in Polish. |
||
| 991 | * |
||
| 992 | * @return string |
||
| 993 | */ |
||
| 994 | public function inPolish() : string |
||
| 998 | |||
| 999 | /** |
||
| 1000 | * Function to retrieve the name in Portuguese. |
||
| 1001 | * |
||
| 1002 | * @return string |
||
| 1003 | */ |
||
| 1004 | public function inPortuguese() : string |
||
| 1008 | |||
| 1009 | /** |
||
| 1010 | * Function to retrieve the name in Punjabi. |
||
| 1011 | * |
||
| 1012 | * @return string |
||
| 1013 | */ |
||
| 1014 | public function inPunjabi() : string |
||
| 1018 | |||
| 1019 | /** |
||
| 1020 | * Function to retrieve the name in Romanian. |
||
| 1021 | * |
||
| 1022 | * @return string |
||
| 1023 | */ |
||
| 1024 | public function inRomanian() : string |
||
| 1028 | |||
| 1029 | /** |
||
| 1030 | * Function to retrieve the name in Russian. |
||
| 1031 | * |
||
| 1032 | * @return string |
||
| 1033 | */ |
||
| 1034 | public function inRussian() : string |
||
| 1038 | |||
| 1039 | /** |
||
| 1040 | * Function to retrieve the name in Samoan. |
||
| 1041 | * |
||
| 1042 | * @return string |
||
| 1043 | */ |
||
| 1044 | public function inSamoan() : string |
||
| 1048 | |||
| 1049 | /** |
||
| 1050 | * Function to retrieve the name in Scots Gaelic. |
||
| 1051 | * |
||
| 1052 | * @return string |
||
| 1053 | */ |
||
| 1054 | public function inScotsGaelic() : string |
||
| 1058 | |||
| 1059 | /** |
||
| 1060 | * Function to retrieve the name in Serbian. |
||
| 1061 | * |
||
| 1062 | * @return string |
||
| 1063 | */ |
||
| 1064 | public function inSerbian() : string |
||
| 1068 | |||
| 1069 | /** |
||
| 1070 | * Function to retrieve the name in Sesotho. |
||
| 1071 | * |
||
| 1072 | * @return string |
||
| 1073 | */ |
||
| 1074 | public function inSesotho() : string |
||
| 1078 | |||
| 1079 | /** |
||
| 1080 | * Function to retrieve the name in Shona. |
||
| 1081 | * |
||
| 1082 | * @return string |
||
| 1083 | */ |
||
| 1084 | public function inShona() : string |
||
| 1088 | |||
| 1089 | /** |
||
| 1090 | * Function to retrieve the name in Sindhi. |
||
| 1091 | * |
||
| 1092 | * @return string |
||
| 1093 | */ |
||
| 1094 | public function inSindhi() : string |
||
| 1098 | |||
| 1099 | /** |
||
| 1100 | * Function to retrieve the name in Sinhala. |
||
| 1101 | * |
||
| 1102 | * @return string |
||
| 1103 | */ |
||
| 1104 | public function inSinhala() : string |
||
| 1108 | |||
| 1109 | /** |
||
| 1110 | * Function to retrieve the name in Slovak. |
||
| 1111 | * |
||
| 1112 | * @return string |
||
| 1113 | */ |
||
| 1114 | public function inSlovak() : string |
||
| 1118 | |||
| 1119 | /** |
||
| 1120 | * Function to retrieve the name in Slovenian. |
||
| 1121 | * |
||
| 1122 | * @return string |
||
| 1123 | */ |
||
| 1124 | public function inSlovenian() : string |
||
| 1128 | |||
| 1129 | /** |
||
| 1130 | * Function to retrieve the name in Somali. |
||
| 1131 | * |
||
| 1132 | * @return string |
||
| 1133 | */ |
||
| 1134 | public function inSomali() : string |
||
| 1138 | |||
| 1139 | /** |
||
| 1140 | * Function to retrieve the name in Spanish. |
||
| 1141 | * |
||
| 1142 | * @return string |
||
| 1143 | */ |
||
| 1144 | public function inSpanish() : string |
||
| 1148 | |||
| 1149 | /** |
||
| 1150 | * Function to retrieve the name in Sundanese. |
||
| 1151 | * |
||
| 1152 | * @return string |
||
| 1153 | */ |
||
| 1154 | public function inSundanese() : string |
||
| 1158 | |||
| 1159 | /** |
||
| 1160 | * Function to retrieve the name in Swahili. |
||
| 1161 | * |
||
| 1162 | * @return string |
||
| 1163 | */ |
||
| 1164 | public function inSwahili() : string |
||
| 1168 | |||
| 1169 | /** |
||
| 1170 | * Function to retrieve the name in Swedish. |
||
| 1171 | * |
||
| 1172 | * @return string |
||
| 1173 | */ |
||
| 1174 | public function inSwedish() : string |
||
| 1178 | |||
| 1179 | /** |
||
| 1180 | * Function to retrieve the name in Tajik. |
||
| 1181 | * |
||
| 1182 | * @return string |
||
| 1183 | */ |
||
| 1184 | public function inTajik() : string |
||
| 1188 | |||
| 1189 | /** |
||
| 1190 | * Function to retrieve the name in Tamil. |
||
| 1191 | * |
||
| 1192 | * @return string |
||
| 1193 | */ |
||
| 1194 | public function inTamil() : string |
||
| 1198 | |||
| 1199 | /** |
||
| 1200 | * Function to retrieve the name in Telugu. |
||
| 1201 | * |
||
| 1202 | * @return string |
||
| 1203 | */ |
||
| 1204 | public function inTelugu() : string |
||
| 1208 | |||
| 1209 | /** |
||
| 1210 | * Function to retrieve the name in Thai. |
||
| 1211 | * |
||
| 1212 | * @return string |
||
| 1213 | */ |
||
| 1214 | public function inThai() : string |
||
| 1218 | |||
| 1219 | /** |
||
| 1220 | * Function to retrieve the name in Turkish. |
||
| 1221 | * |
||
| 1222 | * @return string |
||
| 1223 | */ |
||
| 1224 | public function inTurkish() : string |
||
| 1228 | |||
| 1229 | /** |
||
| 1230 | * Function to retrieve the name in Ukrainian. |
||
| 1231 | * |
||
| 1232 | * @return string |
||
| 1233 | */ |
||
| 1234 | public function inUkrainian() : string |
||
| 1238 | |||
| 1239 | /** |
||
| 1240 | * Function to retrieve the name in Urdu. |
||
| 1241 | * |
||
| 1242 | * @return string |
||
| 1243 | */ |
||
| 1244 | public function inUrdu() : string |
||
| 1248 | |||
| 1249 | /** |
||
| 1250 | * Function to retrieve the name in Uzbek. |
||
| 1251 | * |
||
| 1252 | * @return string |
||
| 1253 | */ |
||
| 1254 | public function inUzbek() : string |
||
| 1258 | |||
| 1259 | /** |
||
| 1260 | * Function to retrieve the name in Vietnamese. |
||
| 1261 | * |
||
| 1262 | * @return string |
||
| 1263 | */ |
||
| 1264 | public function inVietnamese() : string |
||
| 1268 | |||
| 1269 | /** |
||
| 1270 | * Function to retrieve the name in Welsh. |
||
| 1271 | * |
||
| 1272 | * @return string |
||
| 1273 | */ |
||
| 1274 | public function inWelsh() : string |
||
| 1278 | |||
| 1279 | /** |
||
| 1280 | * Function to retrieve the name in Xhosa. |
||
| 1281 | * |
||
| 1282 | * @return string |
||
| 1283 | */ |
||
| 1284 | public function inXhosa() : string |
||
| 1288 | |||
| 1289 | /** |
||
| 1290 | * Function to retrieve the name in Yiddish. |
||
| 1291 | * |
||
| 1292 | * @return string |
||
| 1293 | */ |
||
| 1294 | public function inYiddish() : string |
||
| 1298 | |||
| 1299 | /** |
||
| 1300 | * Function to retrieve the name in Yoruba. |
||
| 1301 | * |
||
| 1302 | * @return string |
||
| 1303 | */ |
||
| 1304 | public function inYoruba() : string |
||
| 1308 | |||
| 1309 | /** |
||
| 1310 | * Function to retrieve the name in Zulu. |
||
| 1311 | * |
||
| 1312 | * @return string |
||
| 1313 | */ |
||
| 1314 | public function inZulu() : string |
||
| 1318 | } |
||
| 1319 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.