Returns an array of countries
@return array
2485
protected function getListCountry()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        return (array) $this->country->getList($conditions);
    }
356430
public function toArray()
    {
        return [
            'title' => $this->title,
            'description' => $this->description,
            'commission' => $this->commission,
            'costCentre' => $this->costCentre,
            'currencyCode' => $this->currencyCode,
            'netShippingCosts' => $this->netShippingCosts,
            'internalNote' => $this->getInternalNote(),
            'responsibleContact' => $this->createDataArray($this->responsibleContact),
            'items' => $this->itemsToArray(),
        ];
    }
1958
public static function countriesList()
    {
        $path = dirname(realpath(__FILE__)).DIRECTORY_SEPARATOR.'data/countries.json';
        $countries = self::readJson($path, true);

        $listCountries = [];

        foreach ($countries['Names'] as $code => $value) {
            $listCountries[$code] = $value;
        }

        return $listCountries;
    }
69550
public function loadCountries()
    {
        $this->countriesJson = $this->loadCountriesJson();

        $overload = $this->helper->loadJsonFiles($this->helper->dataDir('countries/overload'))->mapWithKeys(function ($country, $code) {
            return [upper($code) => $country];
        });

        $this->countriesJson = $this->countriesJson->overwrite($overload);

        return $this->countriesJson;
    }
438403
public function getVariables() 
	{
		if(empty($this->countries)) {
			$this->countries = array(
				'GB' => 'United Kingdom',					'US' => 'United States',
				'AF' => 'Afghanistan',						'AL' => 'Albania',
				'DZ' => 'Algeria',							'AS' => 'American Samoa',
				'AD' => 'Andorra',							'AO' => 'Angola',
				'AI' => 'Anguilla',							'AQ' => 'Antarctica',
				'AG' => 'Antigua And Barbuda',				'AR' => 'Argentina',
				'AM' => 'Armenia',							'AW' => 'Aruba',
				'AU' => 'Australia',						'AT' => 'Austria',
				'AZ' => 'Azerbaijan',						'BS' => 'Bahamas',
				'BH' => 'Bahrain',							'BD' => 'Bangladesh',
				'BB' => 'Barbados',							'BY' => 'Belarus',
				'BE' => 'Belgium',							'BZ' => 'Belize',
				'BJ' => 'Benin',							'BM' => 'Bermuda',
				'BT' => 'Bhutan',							'BO' => 'Bolivia',
				'BA' => 'Bosnia And Herzegowina',			'BW' => 'Botswana',
				'BV' => 'Bouvet Island',					'BR' => 'Brazil',
				'IO' => 'British Indian Ocean Territory',	'BN' => 'Brunei Darussalam',
				'BG' => 'Bulgaria',							'BF' => 'Burkina Faso',
				'BI' => 'Burundi',							'KH' => 'Cambodia',
				'CM' => 'Cameroon',							'CA' => 'Canada',
				'CV' => 'Cape Verde',						'KY' => 'Cayman Islands',
				'CF' => 'Central African Republic',			'TD' => 'Chad',
				'CL' => 'Chile',							'CN' => 'China',
				'CX' => 'Christmas Island',					'CC' => 'Cocos (Keeling) Islands',
				'CO' => 'Colombia',							'KM' => 'Comoros',
				'CG' => 'Congo',							'CD' => 'Congo, The Democratic Republic Of The',
				'CK' => 'Cook Islands',						'CR' => 'Costa Rica',
				'CI' => 'Cote D\'Ivoire',					'HR' => 'Croatia (Local Name: Hrvatska)',
				'CU' => 'Cuba',								'CY' => 'Cyprus',
				'CZ' => 'Czech Republic',					'DK' => 'Denmark',
				'DJ' => 'Djibouti',							'DM' => 'Dominica',
				'DO' => 'Dominican Republic',				'TP' => 'East Timor',
				'EC' => 'Ecuador',							'EG' => 'Egypt',
				'SV' => 'El Salvador',						'GQ' => 'Equatorial Guinea',
				'ER' => 'Eritrea',							'EE' => 'Estonia',
				'ET' => 'Ethiopia',							'FK' => 'Falkland Islands (Malvinas)',
				'FO' => 'Faroe Islands',					'FJ' => 'Fiji',
				'FI' => 'Finland',							'FR' => 'France',
				'FX' => 'France, Metropolitan',				'GF' => 'French Guiana',
				'PF' => 'French Polynesia',					'TF' => 'French Southern Territories',
				'GA' => 'Gabon',							'GM' => 'Gambia',
				'GE' => 'Georgia',							'DE' => 'Germany',
				'GH' => 'Ghana',							'GI' => 'Gibraltar',
				'GR' => 'Greece',							'GL' => 'Greenland',
				'GD' => 'Grenada',							'GP' => 'Guadeloupe',
				'GU' => 'Guam',								'GT' => 'Guatemala',
				'GN' => 'Guinea',							'GW' => 'Guinea-Bissau',
				'GY' => 'Guyana',							'HT' => 'Haiti',
				'HM' => 'Heard And Mc Donald Islands',		'VA' => 'Holy See (Vatican City State)',
				'HN' => 'Honduras',							'HK' => 'Hong Kong',
				'HU' => 'Hungary',							'IS' => 'Iceland',
				'IN' => 'India',							'ID' => 'Indonesia',
				'IR' => 'Iran (Islamic Republic Of)',		'IQ' => 'Iraq',
				'IE' => 'Ireland',							'IL' => 'Israel',
				'IT' => 'Italy',							'JM' => 'Jamaica',
				'JP' => 'Japan',							'JO' => 'Jordan',
				'KZ' => 'Kazakhstan',						'KE' => 'Kenya',
				'KI' => 'Kiribati',							'KP' => 'Korea, Democratic People\'s Republic Of',
				'KR' => 'Korea, Republic Of',				'KW' => 'Kuwait',
				'KG' => 'Kyrgyzstan',						'LA' => 'Lao People\'s Democratic Republic',
				'LV' => 'Latvia',							'LB' => 'Lebanon',
				'LS' => 'Lesotho',							'LR' => 'Liberia',
				'LY' => 'Libyan Arab Jamahiriya',			'LI' => 'Liechtenstein',
				'LT' => 'Lithuania',						'LU' => 'Luxembourg',
				'MO' => 'Macau',							'MK' => 'Macedonia, Former Yugoslav Republic Of',
				'MG' => 'Madagascar',						'MW' => 'Malawi',
				'MY' => 'Malaysia',							'MV' => 'Maldives',
				'ML' => 'Mali',								'MT' => 'Malta',
				'MH' => 'Marshall Islands',					'MQ' => 'Martinique',
				'MR' => 'Mauritania',						'MU' => 'Mauritius',
				'YT' => 'Mayotte',							'MX' => 'Mexico',
				'FM' => 'Micronesia, Federated States Of',	'MD' => 'Moldova, Republic Of',
				'MC' => 'Monaco',							'MN' => 'Mongolia',
				'MS' => 'Montserrat',						'MA' => 'Morocco',
				'MZ' => 'Mozambique',						'MM' => 'Myanmar',
				'NA' => 'Namibia',							'NR' => 'Nauru',
				'NP' => 'Nepal',							'NL' => 'Netherlands',
				'AN' => 'Netherlands Antilles',				'NC' => 'New Caledonia',
				'NZ' => 'New Zealand',						'NI' => 'Nicaragua',
				'NE' => 'Niger',							'NG' => 'Nigeria',
				'NU' => 'Niue',								'NF' => 'Norfolk Island',
				'MP' => 'Northern Mariana Islands',			'NO' => 'Norway',
				'OM' => 'Oman',								'PK' => 'Pakistan',
				'PW' => 'Palau',							'PA' => 'Panama',
				'PG' => 'Papua New Guinea',					'PY' => 'Paraguay',
				'PE' => 'Peru',								'PH' => 'Philippines',
				'PN' => 'Pitcairn',							'PL' => 'Poland',
				'PT' => 'Portugal',							'PR' => 'Puerto Rico',
				'QA' => 'Qatar',							'RE' => 'Reunion',
				'RO' => 'Romania',							'RU' => 'Russian Federation',
				'RW' => 'Rwanda',							'KN' => 'Saint Kitts And Nevis',
				'LC' => 'Saint Lucia',						'VC' => 'Saint Vincent And The Grenadines',
				'WS' => 'Samoa',							'SM' => 'San Marino',
				'ST' => 'Sao Tome And Principe',			'SA' => 'Saudi Arabia',
				'SN' => 'Senegal',							'SC' => 'Seychelles',
				'SL' => 'Sierra Leone',						'SG' => 'Singapore',
				'SK' => 'Slovakia (Slovak Republic)',		'SI' => 'Slovenia',
				'SB' => 'Solomon Islands',					'SO' => 'Somalia',
				'ZA' => 'South Africa',						'GS' => 'South Georgia, South Sandwich Islands',
				'ES' => 'Spain',							'LK' => 'Sri Lanka',
				'SH' => 'St. Helena',						'PM' => 'St. Pierre And Miquelon',
				'SD' => 'Sudan',							'SR' => 'Suriname',
				'SJ' => 'Svalbard And Jan Mayen Islands',	'SZ' => 'Swaziland',
				'SE' => 'Sweden',							'CH' => 'Switzerland',
				'SY' => 'Syrian Arab Republic',				'TW' => 'Taiwan',
				'TJ' => 'Tajikistan',						'TZ' => 'Tanzania, United Republic Of',
				'TH' => 'Thailand',							'TG' => 'Togo',
				'TK' => 'Tokelau',							'TO' => 'Tonga',
				'TT' => 'Trinidad And Tobago',				'TN' => 'Tunisia',
				'TR' => 'Turkey',							'TM' => 'Turkmenistan',
				'TC' => 'Turks And Caicos Islands',			'TV' => 'Tuvalu',
				'UG' => 'Uganda',							'UA' => 'Ukraine',
				'AE' => 'United Arab Emirates',				'UM' => 'United States Minor Outlying Islands',
				'UY' => 'Uruguay',							'UZ' => 'Uzbekistan',
				'VU' => 'Vanuatu',							'VE' => 'Venezuela',
				'VN' => 'Viet Nam',							'VG' => 'Virgin Islands (British)',
				'VI' => 'Virgin Islands (U.S.)',			'WF' => 'Wallis And Futuna Islands',
				'EH' => 'Western Sahara',					'YE' => 'Yemen',
				'YU' => 'Yugoslavia',						'ZM' => 'Zambia',
				'ZW' => 'Zimbabwe');
		}
		
		return array(
			'pattern' => $this->pattern,
			'fields' => $this->show,
			'labels' => $this->labels,
			'data' => $this->data,
			'errors' => $this->errors,
			'holders' => $this->holders,
			'states' => $this->states,
			'regions' => $this->regions,
			'required' => $this->required,
			'neighborhoods' => $this->neighborhoods,
			'countries' => $this->countries);
	}
1080950
private function getFilters()
    {
        $filters = [];

        $regions = [
            'fieldID' => 'region_id',
            'type' => 'dropDownList',
            'label' => trans('HCRegions::regions_countries.region'),
            'options' => HCContinents::all()->toArray(),
            'showNodes' => ['name'],
        ];

        $filters[] = addAllOptionToDropDownList($regions);

        return $filters;
    }
1217439
def countries():
    '''
    
    '''
    global _countries
    if not _countries:
        v = {}
        _countries = v
        try:
            from pytz import country_names
            for k, n in country_names.items():
                v[k.upper()] = n
        except Exception:
            pass
    return _countries
1311589
public function getAllowedShippingCountries()
    {
        $allowedShippingCountriesRaw = $this->getAllowedShippingCountriesRaw();
        $allowedShippingCountries    = [];

        foreach ($allowedShippingCountriesRaw as $countryCode => $states) {
            $states = empty($states) ? ['All' => true] : $states;
            $states = array_filter(
                array_keys($states),
                function ($st) {
                    return is_string($st) ? $st : 'All';
                }
            );

            $states = in_array('All', $states, true) ? ['All'] : $states;

            array_walk(
                $states,
                function (&$state, $key, $country) {
                    $state = $state === 'All' ? $state : $country . '-' . $state;
                },
                $countryCode
            );

            $allowedShippingCountries[] =
                [
                    'country' => $countryCode,
                    'state'   => $states
                ];
        }

        return $allowedShippingCountries;
    }
878484
public function getCountries()
    {
        if (!array_key_exists(Localization::activeLocale(), $this->countries)) {
            $this->loadCountries();
        }

        return $this->countries[Localization::activeLocale()];
    }
1100657
public function actionIndex()
{
    $searchModel  = new CountrySearch;
    $dataProvider = $searchModel->search($_GET);

Tabs::clearLocalStorage();

Url::remember();
\Yii::$app->session['__crudReturnUrl'] = null;

return $this->render('index', [
'dataProvider' => $dataProvider,
    'searchModel' => $searchModel,
]);
}
65445
public function getCountries()
    {
        if ($this->_aCountries === null) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $this->_aCountries = [];
            $sSelect = 'select oxobjectid from oxobject2payment where oxpaymentid=' . $oDb->quote($this->getId()) . ' and oxtype = "oxcountry" ';
            $rs = $oDb->getCol($sSelect);
            $this->_aCountries = $rs;
        }

        return $this->_aCountries;
    }
202317
protected function getCountries() {
        if (!$this->_countries) {
            $this->_countries = new CountryList($this->version);
        }

        return $this->_countries;
    }
523324
public function getUniqueCountry()
    {
        if ($this->country !== Yii::$app->params['defaultCountry']) {
            $countries = Locations::countryList();

            return $countries[$this->country];
        }

        return;
    }
1249693
public function getLocaleArray()
	{
		$localeArray = array();

		foreach ($this->getLocales() as $locale) {

			$country = $locale->getCountry();

			if (! isset($localeArray[$country])) {
				$localeArray[$country] = array(
					'title' => $country,
					'languages' => array()
				);
			}

			$localeArray[$country]['languages'][] = array(
				'id' => $locale->getId(),
				'title' => $locale->getTitle(),
				'flag' => $locale->getProperty('flag')
			);
		}

		return array_values($localeArray);
	}
1291511
protected function getGeoCodeData()
    {
        $result = [];
        foreach ($this->userLocations as $data) {
            $result[] = [
                'country' => ArrayHelper::getValue($data['location'], 'country'),
                'address' => implode(',', ArrayHelper::getValue($data, 'location')),
                'htmlContent' => ArrayHelper::getValue($data, 'htmlContent'),
            ];
        }

        return $result;
    }
1052628
public static function getCurrencyList()
    {
        return [
            'EUR' => ['name' => 'Euro',                  'code' => 978, 'fraction' => 2],
            'USD' => ['name' => 'Dollar Américain',      'code' => 840, 'fraction' => 2],
            'CHF' => ['name' => 'Franc Suisse',          'code' => 756, 'fraction' => 2],
            'GBP' => ['name' => 'Livre Sterling',        'code' => 826, 'fraction' => 2],
            'CAD' => ['name' => 'Dollar Canadien',       'code' => 124, 'fraction' => 2],
            'JPY' => ['name' => 'Yen',                   'code' => 392, 'fraction' => 0],
            'MXN' => ['name' => 'Peso Mexicain',         'code' => 484, 'fraction' => 2],
            'TRY' => ['name' => 'Nouvelle Livre Turque', 'code' => 949, 'fraction' => 2],
            'AUD' => ['name' => 'Dollar Australien',     'code' => 036, 'fraction' => 2],
            'NZD' => ['name' => 'Dollar Néo-Zélandais',  'code' => 554, 'fraction' => 2],
            'NOK' => ['name' => 'Couronne Norvégienne',  'code' => 578, 'fraction' => 2],
            'BRL' => ['name' => 'Real Brésilien',        'code' => 986, 'fraction' => 2],
            'ARS' => ['name' => 'Peso Argentin',         'code' => 032, 'fraction' => 2],
            'KHR' => ['name' => 'Riel',                  'code' => 116, 'fraction' => 2],
            'TWD' => ['name' => 'Dollar de Taiwan',      'code' => 901, 'fraction' => 2],
            'SEK' => ['name' => 'Couronne Suédoise',     'code' => 752, 'fraction' => 2],
            'DKK' => ['name' => 'Couronne Danoise',      'code' => 208, 'fraction' => 2],
            'KRW' => ['name' => 'Won',                   'code' => 410, 'fraction' => 0],
            'SGD' => ['name' => 'Dollar de Singapour',   'code' => 702, 'fraction' => 2],
            'XPF' => ['name' => 'Franc Polynésien',      'code' => 953, 'fraction' => 0],
            'XOF' => ['name' => 'Franc CFA',             'code' => 952, 'fraction' => 0],
        ];
    }
613452
public function getTimezonesList()
    {
        if (!SettingsServer::isTimezoneSupportEnabled()) {
            return array('UTC' => $this->getTimezonesListUTCOffsets());
        }

        $countries = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider')->getCountryList();

        $return = array();
        $continents = array();
        foreach ($countries as $countryCode => $continentCode) {
            $countryCode = strtoupper($countryCode);
            $timezones = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, $countryCode);
            foreach ($timezones as $timezone) {
                if (!isset($continents[$continentCode])) {
                    $continents[$continentCode] = Piwik::translate('Intl_Continent_' . $continentCode);
                }
                $continent = $continents[$continentCode];

                $return[$continent][$timezone] = $this->getTimezoneName($timezone, $countryCode, count($timezones) > 1);
            }
        }

        // Sort by continent name and then by country name.
        ksort($return);
        foreach ($return as $continent => $countries) {
            asort($return[$continent]);
        }

        $return['UTC'] = $this->getTimezonesListUTCOffsets();
        return $return;
    }