‪TYPO3CMS  ‪main
Country.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
25 {
26  protected const ‪LABEL_FILE = 'EXT:core/Resources/Private/Language/Iso/countries.xlf';
27 
28  public function ‪__construct(
29  protected string $alpha2,
30  protected string $alpha3,
31  protected string $name,
32  protected string $numeric,
33  protected string $flag,
34  protected ?string $officialName
35  ) {}
36 
37  public function ‪getName(): string
38  {
39  return $this->name;
40  }
41  public function ‪getLocalizedNameLabel(): string
42  {
43  return 'LLL:' . self::LABEL_FILE . ':' . $this->alpha2 . '.name';
44  }
45 
46  public function ‪getOfficialName(): ?string
47  {
48  return $this->officialName;
49  }
50 
51  public function ‪getLocalizedOfficialNameLabel(): string
52  {
53  return 'LLL:' . self::LABEL_FILE . ':' . $this->alpha2 . '.official_name';
54  }
55 
56  public function ‪getAlpha2IsoCode(): string
57  {
58  return $this->alpha2;
59  }
60 
61  public function ‪getAlpha3IsoCode(): string
62  {
63  return $this->alpha3;
64  }
65 
66  public function ‪getNumericRepresentation(): string
67  {
68  return $this->numeric;
69  }
70 
71  public function ‪getFlag(): string
72  {
73  return $this->flag;
74  }
75 }
‪TYPO3\CMS\Core\Country\Country\getLocalizedOfficialNameLabel
‪getLocalizedOfficialNameLabel()
Definition: Country.php:51
‪TYPO3\CMS\Core\Country\Country\getFlag
‪getFlag()
Definition: Country.php:71
‪TYPO3\CMS\Core\Country\Country\getOfficialName
‪getOfficialName()
Definition: Country.php:46
‪TYPO3\CMS\Core\Country\Country\getAlpha2IsoCode
‪getAlpha2IsoCode()
Definition: Country.php:56
‪TYPO3\CMS\Core\Country\Country\getAlpha3IsoCode
‪getAlpha3IsoCode()
Definition: Country.php:61
‪TYPO3\CMS\Core\Country
Definition: Country.php:18
‪TYPO3\CMS\Core\Country\Country\getName
‪getName()
Definition: Country.php:37
‪TYPO3\CMS\Core\Country\Country
Definition: Country.php:25
‪TYPO3\CMS\Core\Country\Country\LABEL_FILE
‪const LABEL_FILE
Definition: Country.php:26
‪TYPO3\CMS\Core\Country\Country\getLocalizedNameLabel
‪getLocalizedNameLabel()
Definition: Country.php:41
‪TYPO3\CMS\Core\Country\Country\__construct
‪__construct(protected string $alpha2, protected string $alpha3, protected string $name, protected string $numeric, protected string $flag, protected ?string $officialName)
Definition: Country.php:28
‪TYPO3\CMS\Core\Country\Country\getNumericRepresentation
‪getNumericRepresentation()
Definition: Country.php:66