phpDocumentor

AddressFormatProvider
in package
implements AddressFormatProviderInterface

Class AbstractCollection

Tags
category

System

Interfaces, Classes and Traits

AddressFormatProviderInterface
Class AbstractCollection

Table of Contents

$db  : CI_DB_query_builder
Database connection.
__construct()  : mixed
AddressFormatProvider constructor.
getByCountryId()  : int
Returns address format ID based on the country ID provided.
getByIsoCode2()  : int
Returns the address format ID based on the ISO-2 country code provided.
getByIsoCode3()  : int
Returns the address format ID based on the ISO-3 country code provided.
getIds()  : IdCollection
Returns the address format IDs.

Properties

Methods

__construct()

AddressFormatProvider constructor.

public __construct(CI_DB_query_builder $db) : mixed
Parameters
$db : CI_DB_query_builder

Database connection.

Return values
mixed

getByCountryId()

Returns address format ID based on the country ID provided.

public getByCountryId(IdType $countryId) : int
Parameters
$countryId : IdType

Country ID.

Tags
throws
UnexpectedValueException

If no results have been found.

Return values
int

Address format ID.

getByIsoCode2()

Returns the address format ID based on the ISO-2 country code provided.

public getByIsoCode2(StringType $iso2) : int
Parameters
$iso2 : StringType

ISO-2 country code.

Tags
throws
InvalidArgumentException

If code does not have two letters.

throws
UnexpectedValueException

If no results have been found.

Return values
int

Address format ID.

getByIsoCode3()

Returns the address format ID based on the ISO-3 country code provided.

public getByIsoCode3(StringType $iso3) : int
Parameters
$iso3 : StringType

ISO-3 country code.

Tags
throws
InvalidArgumentException

If code does not have three letters.

throws
UnexpectedValueException

If no results have been found.

Return values
int

Address format ID.

Search results