1 <?php
2 /* --------------------------------------------------------------
3 CustomerCountryZone.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 MainFactory::load_class('CustomerCountryZoneInterface');
13
14 /**
15 * Class CustomerCountryZone
16 *
17 * This class is used for getting customer country zone data
18 *
19 * @category System
20 * @package Customer
21 * @subpackage CountryZone
22 * @implements CustomerCountryZoneInterface
23 */
24 class CustomerCountryZone implements CustomerCountryZoneInterface
25 {
26 /**
27 * @var int
28 */
29 protected $id;
30 /**
31 * @var CustomerCountryZoneNameInterface
32 */
33 protected $name;
34 /**
35 * @var CustomerCountryZoneIsoCodeInterface
36 */
37 protected $isoCode;
38
39 /**
40 * Constructor of the class CustomerCountryZone
41 *
42 * @param IdType $id
43 * @param CustomerCountryZoneNameInterface $name
44 * @param CustomerCountryZoneIsoCodeInterface $isoCode
45 *
46 * @throws InvalidArgumentException if argument does not match the expected type
47 * @throws LengthException if trim($p_name) is longer than 32 characters VARCHAR(32)
48 * @throws LengthException if trim($p_isoCode) is longer than 2 characters VARCHAR(32)
49 */
50 public function __construct(IdType $id,
51 CustomerCountryZoneNameInterface $name,
52 CustomerCountryZoneIsoCodeInterface $isoCode)
53 {
54
55 $this->id = (int)(string)$id;
56 $this->name = $name;
57 $this->isoCode = $isoCode;
58 }
59
60 /**
61 * Getter method for the ID
62 *
63 * @return int countryId
64 */
65 public function getId()
66 {
67 return $this->id;
68 }
69
70 /**
71 * Getter method for the name
72 *
73 * @return CustomerCountryZoneNameInterface country name
74 */
75 public function getName()
76 {
77 return $this->name;
78 }
79
80 /**
81 * Getter method for the ISO code
82 *
83 * @return CustomerCountryZoneIsoCodeInterface iso code
84 */
85 public function getCode()
86 {
87 return $this->isoCode;
88 }
89 }