aboutsummaryrefslogtreecommitdiffstats
path: root/library/intl/src/Country/CountryInterface.php
blob: 245a49be9b9aa232f8a2f1405b5df07ff0640f40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php

namespace CommerceGuys\Intl\Country;

interface CountryInterface
{
    /**
     * Gets the two-letter country code.
     *
     * @return string
     */
    public function getCountryCode();

    /**
     * Sets the two-letter country code.
     *
     * @param string $countryCode The two-letter country code.
     */
    public function setCountryCode($countryCode);

    /**
     * Gets the country name.
     *
     * Note that certain locales have incomplete translations, in which
     * case the english version of the country name is used instead.
     *
     * @return string
     */
    public function getName();

    /**
     * Sets the country name.
     *
     * @param string $name The country name.
     */
    public function setName($name);

    /**
     * Gets the three-letter country code.
     *
     * Note that not every country has a three-letter code.
     * CLDR lists "Canary Islands" (IC) and "Ceuta and Melilla" (EA)
     * as separate countries, even though they are formally a part of Spain
     * and have no three-letter or numeric ISO codes.
     *
     * @return string|null
     */
    public function getThreeLetterCode();

    /**
     * Sets the three-letter country code.
     *
     * @param string $threeLetterCode The three-letter country code.
     */
    public function setThreeLetterCode($threeLetterCode);

    /**
     * Gets the numeric country code.
     *
     * The numeric code has three digits, and the first one can be a zero,
     * hence the need to pass it around as a string.
     *
     * Note that not every country has a numeric code.
     * CLDR lists "Canary Islands" (IC) and "Ceuta and Melilla" (EA)
     * as separate countries, even though they are formally a part of Spain
     * and have no three-letter or numeric ISO codes.
     * "Ascension Island" (AE) also has no numeric code, even though it has a
     * three-letter code.
     *
     * @return string|null
     */
    public function getNumericCode();

    /**
     * Sets the numeric country code.
     *
     * @param string $numericCode The numeric country code.
     */
    public function setNumericCode($numericCode);

    /**
     * Gets the country telephone code.
     *
     * Also known as the calling code.
     *
     * Note that not every country has a telephone code.
     * Right now Tristan da Cunha (TI) is the only such example.
     *
     * @return string|null
     */
    public function getTelephoneCode();

    /**
     * Sets the country telephone code.
     *
     * @param string $telephoneCode The telephone code.
     */
    public function setTelephoneCode($telephoneCode);
}