PHP Class CommerceGuys\Addressing\Address

Can be mapped and used by Doctrine (preferably as an embeddable).
Inheritance: implements ImmutableAddressInterface
Show file Open project: commerceguys/addressing Class Usage Examples

Protected Properties

Property Type Description
$additionalName string The additional name
$addressLine1 string The first line of the address block.
$addressLine2 string The second line of the address block.
$administrativeArea string The top-level administrative subdivision of the country.
$countryCode string The two-letter country code.
$dependentLocality string The dependent locality (i.e. neighbourhood).
$familyName string The family name.
$givenName string The given name.
$locale string The locale.
$locality string The locality (i.e. city).
$organization string The organization.
$postalCode string The postal code.
$sortingCode string The sorting code.

Public Methods

Method Description
__construct ( string $countryCode = '', string $administrativeArea = '', string $locality = '', string $dependentLocality = '', string $postalCode = '', string $sortingCode = '', string $addressLine1 = '', string $addressLine2 = '', string $organization = '', string $givenName = '', string $additionalName = '', string $familyName = '', string $locale = 'und' ) Creates an Address instance.
getAdditionalName ( )
getAddressLine1 ( )
getAddressLine2 ( )
getAdministrativeArea ( )
getCountryCode ( )
getDependentLocality ( )
getFamilyName ( )
getGivenName ( )
getLocale ( )
getLocality ( )
getOrganization ( )
getPostalCode ( )
getSortingCode ( )
withAdditionalName ( $additionalName )
withAddressLine1 ( $addressLine1 )
withAddressLine2 ( $addressLine2 )
withAdministrativeArea ( $administrativeArea )
withCountryCode ( $countryCode )
withDependentLocality ( $dependentLocality )
withFamilyName ( $familyName )
withGivenName ( $givenName )
withLocale ( $locale )
withLocality ( $locality )
withOrganization ( $organization )
withPostalCode ( $postalCode )
withSortingCode ( $sortingCode )

Method Details

__construct() public method

Creates an Address instance.
public __construct ( string $countryCode = '', string $administrativeArea = '', string $locality = '', string $dependentLocality = '', string $postalCode = '', string $sortingCode = '', string $addressLine1 = '', string $addressLine2 = '', string $organization = '', string $givenName = '', string $additionalName = '', string $familyName = '', string $locale = 'und' )
$countryCode string The two-letter country code.
$administrativeArea string The administrative area.
$locality string The locality.
$dependentLocality string The dependent locality.
$postalCode string The postal code.
$sortingCode string The sorting code
$addressLine1 string The first line of the address block.
$addressLine2 string The second line of the address block.
$organization string The organization.
$givenName string The given name.
$additionalName string The additional name.
$familyName string The family name.
$locale string The locale. Defaults to 'und'.

getAdditionalName() public method

public getAdditionalName ( )

getAddressLine1() public method

public getAddressLine1 ( )

getAddressLine2() public method

public getAddressLine2 ( )

getAdministrativeArea() public method

getCountryCode() public method

public getCountryCode ( )

getDependentLocality() public method

getFamilyName() public method

public getFamilyName ( )

getGivenName() public method

public getGivenName ( )

getLocale() public method

public getLocale ( )

getLocality() public method

public getLocality ( )

getOrganization() public method

public getOrganization ( )

getPostalCode() public method

public getPostalCode ( )

getSortingCode() public method

public getSortingCode ( )

withAdditionalName() public method

public withAdditionalName ( $additionalName )

withAddressLine1() public method

public withAddressLine1 ( $addressLine1 )

withAddressLine2() public method

public withAddressLine2 ( $addressLine2 )

withAdministrativeArea() public method

public withAdministrativeArea ( $administrativeArea )

withCountryCode() public method

public withCountryCode ( $countryCode )

withDependentLocality() public method

public withDependentLocality ( $dependentLocality )

withFamilyName() public method

public withFamilyName ( $familyName )

withGivenName() public method

public withGivenName ( $givenName )

withLocale() public method

public withLocale ( $locale )

withLocality() public method

public withLocality ( $locality )

withOrganization() public method

public withOrganization ( $organization )

withPostalCode() public method

public withPostalCode ( $postalCode )

withSortingCode() public method

public withSortingCode ( $sortingCode )

Property Details

$additionalName protected property

The additional name
protected string $additionalName
return string

$addressLine1 protected property

The first line of the address block.
protected string $addressLine1
return string

$addressLine2 protected property

The second line of the address block.
protected string $addressLine2
return string

$administrativeArea protected property

The top-level administrative subdivision of the country.
protected string $administrativeArea
return string

$countryCode protected property

The two-letter country code.
protected string $countryCode
return string

$dependentLocality protected property

The dependent locality (i.e. neighbourhood).
protected string $dependentLocality
return string

$familyName protected property

The family name.
protected string $familyName
return string

$givenName protected property

The given name.
protected string $givenName
return string

$locale protected property

The locale.
protected string $locale
return string

$locality protected property

The locality (i.e. city).
protected string $locality
return string

$organization protected property

The organization.
protected string $organization
return string

$postalCode protected property

The postal code.
protected string $postalCode
return string

$sortingCode protected property

The sorting code.
protected string $sortingCode
return string