Class CustomerCountryRepository

Class CustomerCountryRepository

This class provides basic methods for finding customer country data

CustomerCountryRepository implements CustomerCountryRepositoryInterface
Package: Customer\Country
Category: System
Implements: CustomerCountryRepositoryInterface
Located at Services/Core/Country/CustomerCountryRepository.inc.php

Methods summary

public __construct( CustomerCountryReader $customerCountryReader )

Constructor of the class CustomerCountryRepository

public getById( IdType $countryId ) : CustomerCountry
public getByIso2( CustomerCountryIso2Interface $countryIso2 ) : CustomerCountry

Get country by iso2 code.

public findById( IdType $countryId ) : CustomerCountryInterface

This method will get a country if it exists else it will return null.

public findByIso2( CustomerCountryIso2Interface $countryIso2 ) : CustomerCountryInterface|null

Find country by iso2 code.

public getByName( CustomerCountryNameInterface $countryName ) : CustomerCountry

Get country by name.

public findByName( CustomerCountryNameInterface $countryName ) : CustomerCountryInterface

Find country by name.

public isStateMandatory( IdType $countryId ) : boolean

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

Properties summary