CountryService

Namespace

IO\Services

Properties
Type Name Description

CountryRepositoryContract

$countryRepository

SessionStorageService

$sessionStorageService

array

$activeCountries

Methods
public __construct($countryRepository, $sessionStorageService)

CountryService constructor.

Parameters

Type

Name

Description

CountryRepositoryContract

$countryRepository

SessionStorageService

$sessionStorageService

public getActiveCountriesList($lang = null):array

List all active countries

Parameters

Type

Name

Description

string

$lang

public getActiveCountryNameMap($language):array

Get a list of names for the active countries

Parameters

Type

Name

Description

string

$language

public getShippingCountryId():int

Get the ID of the current shipping country

public setShippingCountryId($shippingCountryId)

Set the ID of the current shipping country

Parameters

Type

Name

Description

int

$shippingCountryId

public getCountryById($countryId):Country

Get a specific country by ID

Parameters

Type

Name

Description

int

$countryId

public getCountryName($countryId, $lang = null):string

Get the name of specific country

Parameters

Type

Name

Description

int

$countryId

string

$lang