CustomerCountryRepository
in package
implements
CustomerCountryRepositoryInterface
Class CustomerCountryRepository
This class provides basic methods for finding customer country data
Tags
Interfaces, Classes and Traits
- CustomerCountryRepositoryInterface
- Interface CustomerCountryRepositoryInterface
Table of Contents
- $customerCountryReader : CustomerCountryReaderInterface
- __construct() : mixed
- Constructor of the class CustomerCountryRepository
- findById() : CustomerCountryInterface
- This method will get a country if it exists else it will return null.
- findByIso2() : CustomerCountryInterface|null
- Find country by iso2 code.
- findByName() : CustomerCountryInterface
- Find country by name.
- getAll() : CustomerCountryCollection
- Method to get all customer countries
- getById() : CustomerCountry
- Method to get a customer country with a given country ID
- getByIso2() : CustomerCountry
- Get country by iso2 code.
- getByName() : CustomerCountry
- Get country by name.
- isStateMandatory() : bool
- This method returns whether the specified country, necessary, needs a state.
Properties
$customerCountryReader
protected
CustomerCountryReaderInterface
$customerCountryReader
Methods
__construct()
Constructor of the class CustomerCountryRepository
public
__construct(CustomerCountryReader $customerCountryReader) : mixed
Parameters
- $customerCountryReader : CustomerCountryReader
Return values
mixed —findById()
This method will get a country if it exists else it will return null.
public
findById(IdType $countryId) : CustomerCountryInterface
Parameters
- $countryId : IdType
Return values
CustomerCountryInterface —findByIso2()
Find country by iso2 code.
public
findByIso2(CustomerCountryIso2Interface $countryIso2) : CustomerCountryInterface|null
Parameters
- $countryIso2 : CustomerCountryIso2Interface
Return values
CustomerCountryInterface|null —findByName()
Find country by name.
public
findByName(CustomerCountryNameInterface $countryName) : CustomerCountryInterface
Parameters
- $countryName : CustomerCountryNameInterface
Return values
CustomerCountryInterface —getAll()
Method to get all customer countries
public
getAll() : CustomerCountryCollection
Return values
CustomerCountryCollection —getById()
Method to get a customer country with a given country ID
public
getById(IdType $countryId) : CustomerCountry
Parameters
- $countryId : IdType
Tags
Return values
CustomerCountry —getByIso2()
Get country by iso2 code.
public
getByIso2(CustomerCountryIso2Interface $countryIso2) : CustomerCountry
Parameters
- $countryIso2 : CustomerCountryIso2Interface
Tags
Return values
CustomerCountry —getByName()
Get country by name.
public
getByName(CustomerCountryNameInterface $countryName) : CustomerCountry
Parameters
- $countryName : CustomerCountryNameInterface
Tags
Return values
CustomerCountry —isStateMandatory()
This method returns whether the specified country, necessary, needs a state.
public
isStateMandatory(IdType $countryId) : bool
Parameters
- $countryId : IdType