Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminAccess
    • Collections
    • Deleters
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Managers
    • Readers
    • Writers
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • CustomerGroup
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Serializers
    • Services
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Geschaeftskundenversand
    • Helpers
    • Invoices
    • Orders
    • ParcelShopFinder
    • QuickEdit
    • Serializers
    • Templates
  • Geschaeftskundenversand
    • Exceptions
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Manufacturer
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • OrderStatus
    • Collections
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Repositories
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • QuantityUnit
    • Entities
    • Factories
    • Repositories
  • QuickEdit
    • Interfaces
    • Repositories
  • Review
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Services
    • ValueObjects
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Smarty
    • plugins
  • StaticSeoUrl
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • StaticSeoUrls
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository
  • VersionInfo
    • Factories
    • Reader
    • ValueObjects
  • VPE
    • Entities
    • Factories
    • Repositories
  • Withdrawal
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Services
    • ValueObjects

Classes

  • CountryService
  • CustomerCountry
  • CustomerCountryReader
  • CustomerCountryRepository
  • UnknownCustomerCountry

Class CountryService

Class CountryService

This class is used for finding country data

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

Methods summary

public
# __construct( CustomerCountryRepositoryInterface $customerCountryRepo, CustomerCountryZoneRepositoryInterface $customerCountryZoneRepo )

Constructor of the class CountryService

Constructor of the class CountryService

Parameters

$customerCountryRepo
$customerCountryZoneRepo
public CustomerCountryInterface
# getCountryById( IdType $id )

Getter method for the country ID

Getter method for the country ID

Parameters

$id

Returns

CustomerCountryInterface

Implementation of

CountryServiceInterface::getCountryById()
public CustomerCountryZoneInterface
# getCountryZoneByNameAndCountry( CustomerCountryZoneNameInterface|string $p_zoneName, CustomerCountryInterface $customerCountry )

Getter method for the country zone

Getter method for the country zone

Parameters

$p_zoneName
$customerCountry

Returns

CustomerCountryZoneInterface

Implementation of

CountryServiceInterface::getCountryZoneByNameAndCountry()
public CustomerCountryZoneInterface|null
# findCountryZoneByNameAndCountry( CustomerCountryZoneNameInterface|string $p_zoneName, CustomerCountryInterface $customerCountry )

This method returns a CustomerCountryZone object if found. Otherwise null will be returned.

This method returns a CustomerCountryZone object if found. Otherwise null will be returned.

Parameters

$p_zoneName
$customerCountry

Returns

CustomerCountryZoneInterface|null

Implementation of

CountryServiceInterface::findCountryZoneByNameAndCountry()
public CustomerCountryZoneInterface
# getCountryZoneById( IdType $id )

Parameters

$id

Returns

CustomerCountryZoneInterface
public CustomerCountryZone
# getUnknownCountryZoneByName( string $p_zoneName )

This method will return a new CustomerCountryZone object representing an unknown country zone.

This method will return a new CustomerCountryZone object representing an unknown country zone.

Parameters

$p_zoneName

Returns

CustomerCountryZone

Implementation of

CountryServiceInterface::getUnknownCountryZoneByName()
public array
# findCountryZonesByCountryId( IdType $countryId )

This method will return an array of CustomerCountryZone objects found by the country ID. If the country has no zones, an empty array will be returned

This method will return an array of CustomerCountryZone objects found by the country ID. If the country has no zones, an empty array will be returned

Parameters

$countryId

Returns

array
of CustomerCountryZone objects

Implementation of

CountryServiceInterface::findCountryZonesByCountryId()
public boolean
# countryZoneExistsInCountry( CustomerCountryZoneInterface $customerCountryZone, CustomerCountryInterface $customerCountry )

Checks if there is a country zone in a country

Checks if there is a country zone in a country

Parameters

$customerCountryZone
$customerCountry

Returns

boolean
true|false if country zone exists|not exists

Implementation of

CountryServiceInterface::countryZoneExistsInCountry()
public boolean
# countryHasCountryZones( CustomerCountryInterface $customerCountry )

Checks if country has country zones

Checks if country has country zones

Parameters

$customerCountry

Returns

boolean
true|false if there are|are not country zones

Implementation of

CountryServiceInterface::countryHasCountryZones()
public CustomerCountryInterface
# getCountryByName( string $p_countryName )

Get country by name.

Get country by name.

Parameters

$p_countryName

Returns

CustomerCountryInterface

Implementation of

CountryServiceInterface::getCountryByName()
public CustomerCountryInterface
# findCountryByName( string $p_countryName )

Find country by name.

Find country by name.

Parameters

$p_countryName

Returns

CustomerCountryInterface

Implementation of

CountryServiceInterface::findCountryByName()
public CustomerCountryInterface
# getCountryByIso2( string $p_countryIso2 )

Get country by iso2 code.

Get country by iso2 code.

Parameters

$p_countryIso2

Returns

CustomerCountryInterface

Implementation of

CountryServiceInterface::getCountryByIso2()
public CustomerCountryInterface|null
# findCountryByIso2( string $p_countryIso2 )

Find country by iso2 code.

Find country by iso2 code.

Parameters

$p_countryIso2

Returns

CustomerCountryInterface|null

Implementation of

CountryServiceInterface::findCountryByIso2()
public boolean
# isStateMandatory( IdType $countryId )

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

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

Parameters

$countryId

Returns

boolean

Implementation of

CountryServiceInterface::isStateMandatory()
public CustomerCountryZoneInterface
# getCountryZoneByZoneCodeAndCountry( CustomerCountryZoneIsoCode $zoneCode, CustomerCountryInterface $country )

Returns the country zone by the given zone code and country. An error will be raised if no results are found.

Returns the country zone by the given zone code and country. An error will be raised if no results are found.

Parameters

$zoneCode
Zone code of expected country zone.
$country
Country of zone.

Returns

CustomerCountryZoneInterface
Country zone model.

Throws

CountryZoneNotFoundException
If no results was found by provided arguments.

Implementation of

CountryServiceInterface::getCountryZoneByZoneCodeAndCountry()
public CustomerCountryZoneInterface
# getCountryZoneByZoneCodeAndCountryId( CustomerCountryZoneIsoCode $zoneCode, IdType $countryId )

Returns the country zone by the given zone code and country id. An error will be raised if no results are found.

Returns the country zone by the given zone code and country id. An error will be raised if no results are found.

Parameters

$zoneCode
Zone code of expected country zone.
$countryId
Country id of zone.

Returns

CustomerCountryZoneInterface
Country zone model.

Throws

CountryZoneNotFoundException
If no results was found by provided arguments.

Implementation of

CountryServiceInterface::getCountryZoneByZoneCodeAndCountryId()
public CustomerCountryZoneInterface|null
# findCountryZoneByZoneCodeAndCountry( CustomerCountryZoneIsoCode $zoneCode, CustomerCountryInterface $country )

Finds the country zone by the given zone code and country. Null will be returned if no results are found.

Finds the country zone by the given zone code and country. Null will be returned if no results are found.

Parameters

$zoneCode
Zone code of expected country zone.
$country
Country of zone.

Returns

CustomerCountryZoneInterface|null
Country zone model.

Implementation of

CountryServiceInterface::findCountryZoneByZoneCodeAndCountry()
public CustomerCountryZoneInterface
# findCountryZoneByZoneCodeAndCountryId( CustomerCountryZoneIsoCode $zoneCode, IdType $countryId )

Returns the country zone by the given zone code and country id. Null will be returned if no results are found.

Returns the country zone by the given zone code and country id. Null will be returned if no results are found.

Parameters

$zoneCode
Zone code of expected country zone.
$countryId
Country id of zone.

Returns

CustomerCountryZoneInterface
Country zone model.

Implementation of

CountryServiceInterface::findCountryZoneByZoneCodeAndCountryId()

Properties summary

protected CustomerCountryRepositoryInterface $customerCountryRepo
#
protected CustomerCountryZoneRepositoryInterface $customerCountryZoneRepo
#
API documentation generated by ApiGen