CustomerCountryReader

Implements \CustomerCountryReaderInterface

Class CustomerCountryReader

This class is used for reading customer country data from the database

category

System

package

Customer

subpackage

Country

implements

CustomerCountryReaderInterface

Methods

Constructor of the class CustomerCountryReader

__construct(\AbstractCustomerFactory $customerFactory, \CI_DB_query_builder $dbQueryBuilder) 

Arguments

$customerFactory

\AbstractCustomerFactory

$dbQueryBuilder

\CI_DB_query_builder

_getCountryByArray

_getCountryByArray( $countryDataArray) : \CustomerCountry

Arguments

$countryDataArray

Response

\CustomerCountry

Method to find a country with a given ID if it exists else it will return null

findById(\IdType $countryId) : \CustomerCountry|null

Arguments

$countryId

\IdType

Response

\CustomerCountry|null

Method to find a country with a given iso2 code if it exists else it will return null

findByIso2( $countryIso2) : \CustomerCountry|null

Arguments

$countryIso2

Response

\CustomerCountry|null

Method to find a country with a given name if it exists else it will return null

findByName( $countryName) : \CustomerCountry|null

Arguments

$countryName

Response

\CustomerCountry|null

This method returns whether the specified country, necessary, needs a state.

isStateMandatory(\IdType $countryId) : boolean

Arguments

$countryId

\IdType

Response

boolean

Properties

customerFactory

customerFactory : \AbstractCustomerFactory

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder