PHP Интерфейс CommerceGuys\Addressing\AddressInterface

Field names follow the OASIS "eXtensible Address Language" (xAL) standard: http://www.oasis-open.org/committees/ciq/download.shtml Doesn't include the sub-administrative area (United States: county, Italy: province, Great Britain: county) because it is not required for addressing purposes. Makes no assumptions about mutability. The implementing application can extend the interface to provide setters, or implement a value object that uses either PSR-7 style with* mutators or relies on an AddressBuilder.
См. также: CommerceGuys\Addressing\ImmutableAddressInterface
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
getAdditionalName ( ) : string Gets the additional name.
getAddressLine1 ( ) : string Gets the first line of address block.
getAddressLine2 ( ) : string Gets the second line of address block.
getAdministrativeArea ( ) : string Gets the administrative area.
getCountryCode ( ) : string Gets the two-letter country code.
getDependentLocality ( ) : string Gets the dependent locality (i.e neighbourhood).
getFamilyName ( ) : string Gets the family name (i.e last name).
getGivenName ( ) : string Gets the given name (i.e first name).
getLocale ( ) : string Gets the locale.
getLocality ( ) : string Gets the locality (i.e city).
getOrganization ( ) : string Gets the organization.
getPostalCode ( ) : string Gets the postal code.
getSortingCode ( ) : string Gets the sorting code.

Описание методов

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

Can be used to hold a middle name, or a patronymic. If a remote API does not have an additional_name/middle_name parameter, append it to the given name.
public getAdditionalName ( ) : string
Результат string The additional name.

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

Gets the first line of address block.
public getAddressLine1 ( ) : string
Результат string The first line of the address block.

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

Gets the second line of address block.
public getAddressLine2 ( ) : string
Результат string The second line of the address block.

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

Called the "state" in the United States, "province" in France and Italy, "county" in Great Britain, "prefecture" in Japan, etc.
public getAdministrativeArea ( ) : string
Результат string The administrative area. A subdivision code if there are predefined subdivision at this level.

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.

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

When representing a double-dependent locality in Great Britain, includes both the double-dependent locality and the dependent locality, e.g. "Whaley, Langwith".
public getDependentLocality ( ) : string
Результат string The administrative area. A subdivision code if there are predefined subdivision at this level.

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

Gets the family name (i.e last name).
public getFamilyName ( ) : string
Результат string The family name.

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

Gets the given name (i.e first name).
public getGivenName ( ) : string
Результат string The given name.

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

Allows the initially-selected address format / subdivision translations to be selected and used the next time this address is modified.
public getLocale ( ) : string
Результат string The locale.

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

Some countries do not use this field; their address lines are sufficient to locate an address within a sub-administrative area.
public getLocality ( ) : string
Результат string The administrative area. A subdivision code if there are predefined subdivision at this level.

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

Gets the organization.
public getOrganization ( ) : string
Результат string The organization.

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

The value is often alphanumeric.
public getPostalCode ( ) : string
Результат string The postal code.

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

For example, CEDEX in France.
public getSortingCode ( ) : string
Результат string The sorting code.