Monarobase\CountryList\CountryList::has PHP Method

has() public method

Indicates whether or not a given $countryCode matches a country.
public has ( string $countryCode, string $locale = 'en', string $source = 'cldr' ) : boolean
$countryCode string A 2-letter country code
$locale string The locale (default: en)
$source string Data source: "icu" or "cldr"
return boolean true if a match was found, false otherwise
    public function has($countryCode, $locale = 'en', $source = 'cldr')
    {
        $locales = $this->loadData($locale, mb_strtolower($source), 'php');
        return isset($locales[mb_strtoupper($countryCode)]);
    }