Returns an array of country data
@param string $country_code
500560
protected function setCountryCity($country_code)
    {
        $this->data_country = $this->country->get($country_code);

        if (empty($this->data_country)) {
            $this->outputHttpStatus(404);
        }
    }
733192
public function get($countryCode)
    {
        if (strlen($countryCode) !== 2) {
            throw new \InvalidArgumentException('Please provide a 2 character country code.');
        }

        $countryCode = strtoupper($countryCode);

        if (array_key_exists($countryCode, $this->aliases)) {
            $countryCode = $this->aliases[$countryCode];
        }

        return implode('', array_map([$this, 'toUnicode'], str_split($countryCode)));
    }
2485
protected function getListCountry()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        return (array) $this->country->getList($conditions);
    }
1266701
@Nullable
  public static IBANCountryData getCountryData (@Nonnull final String sCountryCode)
  {
    ValueEnforcer.notNull (sCountryCode, "CountryCode");

    return s_aIBANData.get (sCountryCode.toUpperCase (Locale.US));
  }
948175
public function getStateCode($lookFor, $country = null)
    {
        $lookFor = mb_strtoupper($lookFor);
        $countries = is_null($country) ? array_keys($this->countries) : (array) $country;

        foreach ($countries as $countryCode) {
            $states = array_map('mb_strtoupper', $this->findCountryStates($countryCode));

            if ($code = array_search($lookFor, $states)) {
                return $code;
            }
        }
    }
466404
public function listCountryState($code)
    {
        $this->setCountry($code);
        $this->actionListCountryState();
        $this->setTitleListCountryState();
        $this->setBreadcrumbListCountryState();
        $this->setFilterListCountryState();
        $this->setPagerListCountryState();

        $this->setData('country', $this->data_country);
        $this->setData('states', $this->getListCountryState());

        $this->outputListCountryState();
    }
164280
public static function getName(CountryCode $code)
    {
        $codeValue = $code->toNative();
        $name      = self::$names[$codeValue];

        return new StringLiteral($name);
    }
608918
protected function setCountry($country_code)
    {
        $this->data_country = array();

        if (!empty($country_code)) {
            $this->data_country = $this->country->get($country_code);
            if (empty($this->data_country)) {
                $this->outputHttpStatus(404);
            }
        }
    }
1270139
protected function getCountryFormatAddress()
    {
        $updating = $this->getUpdating();

        if (isset($updating['country_format'])) {
            return $updating['country_format'];
        }

        $field = 'country';
        $code = $this->getSubmitted($field);

        if (!isset($code)) {
            return $this->country->getDefaultFormat();
        }

        $country = $this->country->get($code);

        if (empty($country['format'])) {
            $this->setErrorUnavailable($field, $this->translation->text('Country'));
            return array();
        }

        return $country['format'];
    }
1112362
public function getCountries()
    {
        // Cache by locale
        $locale = i18n::get_locale();
        if (!empty(static::$cache_countries[$locale])) {
            return static::$cache_countries[$locale];
        }

        // Localise all countries
        $countries = $this->config()->get('countries');
        $localised = [];
        foreach ($countries as $code => $default) {
            $localised[$code] = $this->countryName($code);
        }

        // Always sort by localised name, not key
        $collator = new Collator(i18n::get_locale());
        $collator->asort($localised);
        static::$cache_countries[$locale] = $localised;
        return $localised;
    }
140046
public static function getCountryForCode($code)
    {
        $country = KlarnaCountry::fromCode($code);
        if ($country === null) {
            throw new Klarna_UnknownCountryException($code);
        }
        return $country;
    }
321377
public static function getContinentByCountry($country='')
	{
		if (!$country || !($gdb = self::getGeoDBO()))
		{
			return array();
		}

		$gdb->setQuery("SELECT DISTINCT continent FROM country_continent WHERE LOWER(country) ='" . strtolower($country) . "'");
		return $gdb->loadColumn();
	}
132677
public function getCountryList($includeInternalCodes = false)
    {
        if ($this->countryList === null) {
            $this->countryList = require __DIR__ . '/../Resources/countries.php';
        }
        if ($this->countryExtraList === null) {
            $this->countryExtraList = require __DIR__ . '/../Resources/countries-extra.php';
        }

        if ($includeInternalCodes) {
            return array_merge($this->countryList, $this->countryExtraList);
        }

        return $this->countryList;
    }
1118039
public static function simpleCountries(string $code = null)
    {
        $file = __DIR__ . "/../Assets/Countries.json";
        $json = json_decode(file_get_contents($file), true);

        if ($code) {
            return $json[$code];
        }

        return Collection::make($json);
    }
1078428
public void addCountryCode(final String countryCode) {
        if (null == countryCodes) {
            countryCodes = new ArrayList<String>();
        }
        countryCodes.add(countryCode);
    }
199586
public static function languageCountryLocaleCode($languageCode, $countryCode)
    {
        $countryLocaleCodes = static::countryLocaleCodes($countryCode);
        $languageLocaleCodes = static::languageLocaleCodes($languageCode);
        if ($localeCodes = array_intersect($languageLocaleCodes, $countryLocaleCodes)) {
            return reset($localeCodes);
        }

        return \Locale::composeLocale([
            'language' => $languageCode,
            'region' => $countryCode,
        ]);
    }
503288
public static function getRegionNameFromCodes($countryCode, $regionCode)
    {
        $regionNames = self::getRegionNames();

        $countryCode = strtoupper($countryCode);
        $regionCode = strtoupper($regionCode);

        if (isset($regionNames[$countryCode][$regionCode])) {
            return $regionNames[$countryCode][$regionCode];
        } else {
            return Piwik::translate('General_Unknown');
        }
    }