AddressFormatProvider

Implements \AddressFormatProviderInterface

Class AbstractCollection

category

System

package

Shared

Methods

AddressFormatProvider constructor.

__construct(\CI_DB_query_builder $db) 

Arguments

$db

\CI_DB_query_builder

Database connection.

Returns address format ID based on the country ID provided.

getByCountryId(\IdType $countryId) : integer
Throws
\UnexpectedValueException

If no results have been found.

Arguments

$countryId

\IdType

Country ID.

Response

integer

Address format ID.

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

getByIsoCode2(\StringType $iso2) : integer
Throws
\InvalidArgumentException

If code does not have two letters.

\UnexpectedValueException

If no results have been found.

Arguments

$iso2

\StringType

ISO-2 country code.

Response

integer

Address format ID.

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

getByIsoCode3(\StringType $iso3) : integer
Throws
\InvalidArgumentException

If code does not have three letters.

\UnexpectedValueException

If no results have been found.

Arguments

$iso3

\StringType

ISO-3 country code.

Response

integer

Address format ID.

Returns the address format IDs.

getIds() : \IdCollection
Throws
\UnexpectedValueException

If no ID has been found.

Response

\IdCollection

Collection of address format IDs.

Properties

Database connection.

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder