1 <?php
2 /* --------------------------------------------------------------
3 CountryServiceInterface.inc.php 2015-02-18 gm
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12 /**
13 * Interface CountryServiceInterface
14 *
15 * @category System
16 * @package Customer
17 * @subpackage Interfaces
18 */
19 interface CountryServiceInterface
20 {
21
22 /**
23 * Method to get a country with a given id
24 *
25 * @param IdType $id
26 *
27 * @return CustomerCountryInterface
28 */
29 public function getCountryById(IdType $id);
30
31
32 /**
33 * Method to get a country with a given name and country
34 *
35 * @param $p_zoneName
36 * @param CustomerCountryInterface $customerCountry
37 *
38 * @return CustomerCountryZoneInterface
39 */
40 public function getCountryZoneByNameAndCountry($p_zoneName, CustomerCountryInterface $customerCountry);
41
42
43 /**
44 * Method to check if a country zone exists in a country
45 *
46 * @param CustomerCountryZoneInterface $customerCountryZone
47 * @param CustomerCountryInterface $customerCountry
48 *
49 * @return bool
50 */
51 public function countryZoneExistsInCountry(CustomerCountryZoneInterface $customerCountryZone,
52 CustomerCountryInterface $customerCountry);
53
54
55 /**
56 * Method to check if a country has country zones
57 *
58 * @param CustomerCountryInterface $customerCountry
59 *
60 * @return bool
61 */
62 public function countryHasCountryZones(CustomerCountryInterface $customerCountry);
63
64
65 /**
66 * This method will return a new CustomerCountryZone object representing an unknown country zone.
67 *
68 * @param string $p_zoneName
69 *
70 * @return CustomerCountryZone
71 */
72 public function getUnknownCountryZoneByName($p_zoneName);
73
74
75 /**
76 * This method will return an array of CustomerCountryZone objects found by the country ID. If the country has
77 * no zones, an empty array will be returned
78 *
79 * @param IdType $countryId
80 *
81 * @return array of CustomerCountryZone objects
82 */
83 public function findCountryZonesByCountryId(IdType $countryId);
84
85
86 /**
87 * Get customer by country name.
88 *
89 * @param string $p_countryName
90 *
91 * @return CustomerCountry
92 */
93 public function getCountryByName($p_countryName);
94
95 }