CommerceGuys\Addressing\AddressInterface::getCountryCode PHP Метод

getCountryCode() публичный Метод

This is a CLDR country code, since CLDR includes additional countries for addressing purposes, such as Canary Islands (IC).
public getCountryCode ( ) : string
Результат string The two-letter country code.
    public function getCountryCode();

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function match(AddressInterface $address)
 {
     if ($address->getCountryCode() != $this->countryCode) {
         return false;
     }
     if ($this->administrativeArea && $this->administrativeArea != $address->getAdministrativeArea()) {
         return false;
     }
     if ($this->locality && $this->locality != $address->getLocality()) {
         return false;
     }
     if ($this->dependentLocality && $this->dependentLocality != $address->getDependentLocality()) {
         return false;
     }
     if (!PostalCodeHelper::match($address->getPostalCode(), $this->includedPostalCodes, $this->excludedPostalCodes)) {
         return false;
     }
     return true;
 }
All Usage Examples Of CommerceGuys\Addressing\AddressInterface::getCountryCode