1<?php
2
3namespace MusicBrainz;
4
5/**
6 * Class Country
7 * @package MusicBrainz
8 */
9class Country
10{
11    /**
12     * @todo Populate rest of the countries
13     */
14    private static $countries = array(
15        'GB' => 'Great Britain',
16    );
17
18    /**
19     * Get the country name for a MusicBrainz country code
20     *
21     * @static
22     *
23     * @param $countryCode
24     *
25     * @throws \OutOfBoundsException
26     * @return bool
27     */
28    public static function getName($countryCode)
29    {
30        if (!isset(self::$countries[$countryCode])) {
31            throw new \OutOfBoundsException(
32                sprintf(
33                    "Could not find corresponding country name for the country code %s",
34                    $countryCode
35                )
36            );
37        }
38
39        return self::$countries[$countryCode];
40    }
41}
42