
| Current Path : /var/www/html/store/web/modules/contrib/commerce/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/modules/contrib/commerce/src/Country.php |
<?php
namespace Drupal\commerce;
/**
* Represents a country.
*/
final class Country {
/**
* Two-letter country code.
*
* @var string
*/
protected $countryCode;
/**
* Constructs a new Country object.
*
* @param string $country_code
* The country code.
*/
public function __construct(string $country_code) {
$this->countryCode = strtoupper($country_code);
}
/**
* Gets the country code.
*
* @return string
* The country code.
*/
public function getCountryCode() : string {
return $this->countryCode;
}
/**
* Gets the string representation of the country.
*
* @return string
* The string representation of the country
*/
public function __toString() : string {
return $this->countryCode;
}
}