@param string|null $countryCode

@return self
189878
private function setCountryCode(?string $countryCode): self
    {
        $this->updatePropertyValue(
            CountryCodeFieldInterface::PROP_COUNTRY_CODE,
            $countryCode
        );

        return $this;
    }
149986
public function formatCountry($country_code)
    {
        $this->setCountry($country_code);
        $this->setTitleFormatCountry();
        $this->setBreadcrumbFormatCountry();

        $this->setData('format', $this->data_country['format']);

        $this->submitFormatCountry();
        $this->outputFormatCountry();
    }
650370
public function prune($country = null)
    {
        if ($country) {
            $this->addUsingAlias(CountryPeer::ID, $country->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
1014284
public function setPostcode(\Chill\MainBundle\Entity\PostalCode $postcode = null)
    {
        $this->postcode = $postcode;

        return $this;
    }
924452
public static function getLocaleByCode($languageCode, $countryCode = null) {
		$class = 'Dater\Locale\\' . ucfirst(strtolower($languageCode)) . ($countryCode ? ucfirst(strtolower($countryCode)) : '');
		if(!class_exists($class)) {
			throw new \Exception('Unknown locale code. Class "' . $class . '" not found.');
		}
		return new $class();
	}
725482
public static function make(string $country = null)
    {
        if (empty($country)) {
            $country = config('default');
        }

        return (new static() )->setCurrency($country);
    }
864653
public static function countryLanguageCodes($countryCode)
    {
        $localeCodes = Locale::countryLocaleCodes($countryCode);

        $list = [];
        foreach ($localeCodes as $localeCode) {
            $list[] = Locale::languageCode($localeCode);
        }

        return $list;
    }
1007090
public function getCountryFlag(string $countryCode): string
    {
        try {
            return FlagGenerator::fromCountryCode($countryCode);
        } catch (Throwable $t) {
            return $countryCode;
        }
    }
535897
public function code ( $code = NULL ) {
      if ( $code === NULL )
        return $this->code;
      if ( ResponseCode::find( $code ) === NULL )
        throw new \InvalidArgumentException( "Response: no code $code" );
      $this->code = intval( $code );
      return $this;
    }
580995
public function setAvailablePostage($country, $code)
    {
        $postage_areas = new ShippingCalculator($code, $country);
        
        $postage_areas
            ->setCost($this->SubTotalCost)
            ->setWeight($this->TotalWeight)
            ->setItems($this->TotalItems);
            
        $postage_areas = $postage_areas->getPostageAreas();
        
        Session::set("Checkout.AvailablePostage", $postage_areas);

        return $this;
    }
1105190
public static function countryLocaleCode($countryCode)
    {
        $countryLocaleCodes = static::countryLocaleCodes($countryCode);
        if ($languageCode = Language::countryLanguageCode($countryCode)) {
            $languageLocaleCodes = static::languageLocaleCodes($languageCode);
            if ($localeCodes = array_intersect($languageLocaleCodes, $countryLocaleCodes)) {
                return reset($localeCodes);
            } elseif ($countryLocaleCodes) {
                return reset($countryLocaleCodes);
            } elseif ($languageLocaleCodes) {
                return reset($languageLocaleCodes);
            }

            return \Locale::composeLocale([
                'language' => $languageCode,
                'region' => $countryCode,
            ]);
        }

        if (!count($countryLocaleCodes)) {
            return null;
        } elseif (count($countryLocaleCodes) == 1) {
            return reset($countryLocaleCodes);
        }

        if ($localeCode = static::findMainCode($countryLocaleCodes)) {
            return $localeCode;
        }

        foreach ($countryLocaleCodes as $localeCode) {
            $languageCode = static::languageCode($localeCode);
            if (!strcasecmp($languageCode, $countryCode)) {
                return $localeCode;
            }
        }

        return reset($countryLocaleCodes);
    }
1163523
public function setStatusCode($code)
    {
        $this->headerBag->setStatusCode($code);
        $this->statusCode = $code;

        return $this;
    }
199514
public function setCompanyPhone($areaCode, $number, $countryCode = 55)
    {
        $this->initializeCompany();
        $this->data->company->phone = new stdClass();
        $this->data->company->phone->countryCode = $countryCode;
        $this->data->company->phone->areaCode = $areaCode;
        $this->data->company->phone->number = $number;

        return $this;
    }
165310
protected function deleteCountry(
        InputInterface $input,
        OutputInterface $output,
        $countryCode
    ) {
        $noInteraction = $input->getOption('no-interaction');
        $country = $this
            ->locationDirector
            ->findOneBy([
                'code' => $countryCode,
            ]);

        if ($country instanceof LocationInterface) {
            if (
                !$noInteraction &&
                !$this->confirmRemoval(
                    $input,
                    $output,
                    $countryCode,
                    $output
                )
            ) {
                return $this;
            }

            $this->dropCountry($country, $output);
        } else {
            $this
                ->printMessage(
                    $output,
                    'Geo',
                    'Country ' . $countryCode . ' not found in your database'
                );
        }

        return $this;
    }
913158
public static function codes($countryCode = null)
    {
        return $countryCode
            ? \DateTimeZone::listIdentifiers(\DateTimeZone::PER_COUNTRY, $countryCode)
            : \DateTimeZone::listIdentifiers();
    }
997744
public function setCode($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

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


        return $this;
    }
50243
public function getReducedRates($countryCode)
    {
        $country = $this->getCountry($countryCode);
        if (!is_null($country)) {
            return $country->getReducedRates();
        }

        return null;
    }