{@inheritdoc}

@return CountryValue;
760850
public function convertFieldValueFromForm($data)
    {
        $country = array();

        // case if multiple is true
        if (is_array($data)) {
            foreach ($data as $countryCode) {
                if (array_key_exists($countryCode, $this->countryData)) {
                    $country[$countryCode] = $this->countryData[$countryCode];
                }
            }
        } else {
            if (array_key_exists($data, $this->countryData)) {
                $country[$data] = $this->countryData[$data];
            }
        }

        return new CountryValue((array) $country);
    }
1099049
public function setCountry(\Core\Entity\Country $country = null)
    {
        $this->country = $country;

        return $this;
    }
323327
public static function getContinent($country)
    {
        /** @var RegionDataProvider $dataProvider */
        $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider');

        $countryList = $dataProvider->getCountryList();

        if ($country == 'ti') {
            $country = 'cn';
        }

        return isset($countryList[$country]) ? $countryList[$country] : 'unk';
    }
1331325
public function getCountry($id)
    {
        foreach ($this->data as $country) {
            if (strtoupper($id) == (string) $country) {
                return $country;
            }
        }

        return null;
    }
425392
public function getCountry() : ?string 
    {
        if ( ! $this->hasCountry()) {
            $this->setCountry($this->getDefaultCountry());
        }
        return $this->country;
    }
603248
public function setEn($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->en !== $v) {
            $this->en = $v;
            $this->modifiedColumns[] = CountryPeer::EN;
        }


        return $this;
    }
776556
public function setValue($value, $data = null)
    {
        // Check Provided Value:
        
        if ($value && $this->isValidValue($value)) {
            return parent::setValue($value, $data);
        }
        
        // Default to Locale (if enabled):
        
        if ($this->config()->default_to_locale) {
            
            if (($code = $this->getCountryFromLocale()) && $this->isValidValue($code)) {
                return parent::setValue($code, $data);
            }
            
        }
        
        // Default to Country (if defined):
        
        if (($code = strtolower($this->config()->default_country)) && $this->isValidValue($code)) {
            return parent::setValue($code, $data);
        }
        
        // Answer Self:
        
        return $this;
    }
644056
function get($countryCode = false, $separator = '')
    {
        if ($countryCode == false) {
            $formattedNumber = '0' . $this->msisdn;

            if ( ! empty($separator)) {
                $formattedNumber = substr_replace($formattedNumber, $separator, 4, 0);
                $formattedNumber = substr_replace($formattedNumber, $separator, 8, 0);
            }

            return $formattedNumber;
        } else {
            $formattedNumber = $this->countryPrefix . $this->msisdn;

            if ( ! empty($separator)) {
                $formattedNumber = substr_replace($formattedNumber, $separator, strlen($this->countryPrefix), 0);
                $formattedNumber = substr_replace($formattedNumber, $separator, 7, 0);
                $formattedNumber = substr_replace($formattedNumber, $separator, 11, 0);
            }

            return $formattedNumber;
        }
    }
254411
public function filter($value)
    {
        $normalized = strtoupper(trim($value));
        if (array_key_exists($normalized, $this->states) === true) {
            return $this->states[$normalized];
        }
        if (
            $this->getConfig('includeTerritories') === true &&
            array_key_exists($normalized, $this->territories) === true
        ) {
            return $this->territories[$normalized];
        }
        if ($this->getConfig('abortOnInvalidInput') === true) {
            throw new \UnexpectedValueException('Input value can not be mapped to a state abbreviation.');
        }
        return $value;
    }
1057857
public function getCurrencyForCountry(string $countryCode) : Currency
    {
        $currencies = $this->getCurrenciesForCountry($countryCode);

        $count = count($currencies);

        if ($count === 1) {
            return $currencies[0];
        }

        if ($count === 0) {
            throw UnknownCurrencyException::noCurrencyForCountry($countryCode);
        }

        $currencyCodes = [];

        foreach ($currencies as $currency) {
            $currencyCodes[] = $currency->getCurrencyCode();
        }

        throw UnknownCurrencyException::noSingleCurrencyForCountry($countryCode, $currencyCodes);
    }
917419
public static function get($country)
    {
        switch (strtoupper($country)) {
        case "DE":
            return KlarnaEncoding::PNO_DE;
        case "DK":
            return KlarnaEncoding::PNO_DK;
        case "FI":
            return KlarnaEncoding::PNO_FI;
        case "NL":
            return KlarnaEncoding::PNO_NL;
        case "NO":
            return KlarnaEncoding::PNO_NO;
        case "SE":
            return KlarnaEncoding::PNO_SE;
        case "AT":
            return KlarnaEncoding::PNO_AT;
        default:
            return -1;
        }
    }
417013
public static function getCountryCode($countryName)
    {
        foreach (self::$countries as $key => $value) {
            if (!strcasecmp($value, $countryName)) {
                return $key;
            }
        }
        return '';
    }
686850
protected function getCountry($countryId)
    {
        $entityManager = $this->getEntityManager();

        /** @var \Rcm\Repository\Country $countryRepo */
        $countryRepo = $entityManager->getRepository(\Rcm\Entity\Country::class);

        $country = $countryRepo->find(
            $countryId
        );

        if (!$country instanceof Country) {
            throw new \Exception("Country {$countryId} could not be found.");
        }

        return $country;
    }
164989
function country()
    {
        if ( $this->attribute( 'country_code' ) != '*' )
        {
            $countryINI = eZINI::instance( 'country.ini' );
            $countryName = $countryINI->variable( $this->attribute( 'country_code' ) , 'Name' );
        }
        else
        {
            $countryName = '*';
        }
        return $countryName;
    }
466731
public function getAreaId()
    {
        $firstAreaCountry = CountryAreaQuery::create()->findOneByCountryId($this->getId());

        if (null !== $firstAreaCountry) {
            return $firstAreaCountry->getAreaId();
        }

        return null;
    }
76578
@ManyToOne( cascade = {CascadeType.PERSIST, CascadeType.MERGE} )
    @JoinColumn(name="COUNTRY_ID")
	public Country getCountry() 
	{
		return country;
	}
647845
public function setCountry($country)
    {
        $this->set('country', $country);

        $vat = $this->getService('repos:subscriptions.vat')->find(array('country' => $country));

        if ($vat) {
            $this->setVat($vat);
        }

        return $this;
    }