PHP Interface 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.
See also: CommerceGuys\Addressing\ImmutableAddressInterface
Afficher le fichier Open project: commerceguys/addressing Interface Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

getAdditionalName() public méthode

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
Résultat string The additional name.

getAddressLine1() public méthode

Gets the first line of address block.
public getAddressLine1 ( ) : string
Résultat string The first line of the address block.

getAddressLine2() public méthode

Gets the second line of address block.
public getAddressLine2 ( ) : string
Résultat string The second line of the address block.

getAdministrativeArea() public méthode

Called the "state" in the United States, "province" in France and Italy, "county" in Great Britain, "prefecture" in Japan, etc.
public getAdministrativeArea ( ) : string
Résultat string The administrative area. A subdivision code if there are predefined subdivision at this level.

getCountryCode() public méthode

This is a CLDR country code, since CLDR includes additional countries for addressing purposes, such as Canary Islands (IC).
public getCountryCode ( ) : string
Résultat string The two-letter country code.

getDependentLocality() public méthode

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
Résultat string The administrative area. A subdivision code if there are predefined subdivision at this level.

getFamilyName() public méthode

Gets the family name (i.e last name).
public getFamilyName ( ) : string
Résultat string The family name.

getGivenName() public méthode

Gets the given name (i.e first name).
public getGivenName ( ) : string
Résultat string The given name.

getLocale() public méthode

Allows the initially-selected address format / subdivision translations to be selected and used the next time this address is modified.
public getLocale ( ) : string
Résultat string The locale.

getLocality() public méthode

Some countries do not use this field; their address lines are sufficient to locate an address within a sub-administrative area.
public getLocality ( ) : string
Résultat string The administrative area. A subdivision code if there are predefined subdivision at this level.

getOrganization() public méthode

Gets the organization.
public getOrganization ( ) : string
Résultat string The organization.

getPostalCode() public méthode

The value is often alphanumeric.
public getPostalCode ( ) : string
Résultat string The postal code.

getSortingCode() public méthode

For example, CEDEX in France.
public getSortingCode ( ) : string
Résultat string The sorting code.