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

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