1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* LeadCommerce\Shopware\SDK\Entity |
4
|
|
|
* |
5
|
|
|
* Copyright 2016 LeadCommerce |
6
|
|
|
* |
7
|
|
|
* @author Alexander Mahrt <[email protected]> |
8
|
|
|
* @copyright 2016 LeadCommerce <[email protected]> |
9
|
|
|
*/ |
10
|
|
|
namespace LeadCommerce\Shopware\SDK\Entity; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Class Currency |
14
|
|
|
*/ |
15
|
|
|
class Currency extends Base |
16
|
|
|
{ |
17
|
|
|
/** |
18
|
|
|
* @var int |
19
|
|
|
*/ |
20
|
|
|
protected $id; |
21
|
|
|
/** |
22
|
|
|
* @var string |
23
|
|
|
*/ |
24
|
|
|
protected $currency; |
25
|
|
|
/** |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
protected $name; |
29
|
|
|
/** |
30
|
|
|
* @var bool |
31
|
|
|
*/ |
32
|
|
|
protected $default; |
33
|
|
|
/** |
34
|
|
|
* @var float |
35
|
|
|
*/ |
36
|
|
|
protected $factor; |
37
|
|
|
/** |
38
|
|
|
* @var string |
39
|
|
|
*/ |
40
|
|
|
protected $symbol; |
41
|
|
|
/** |
42
|
|
|
* @var int |
43
|
|
|
*/ |
44
|
|
|
protected $symbolPosition; |
45
|
|
|
/** |
46
|
|
|
* @var int |
47
|
|
|
*/ |
48
|
|
|
protected $position; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @return int |
52
|
|
|
*/ |
53
|
|
|
public function getId() |
54
|
|
|
{ |
55
|
|
|
return $this->id; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @param int $id |
60
|
|
|
* |
61
|
|
|
* @return Currency |
62
|
|
|
*/ |
63
|
|
|
public function setId($id) |
64
|
|
|
{ |
65
|
|
|
$this->id = $id; |
66
|
|
|
|
67
|
|
|
return $this; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return string |
72
|
|
|
*/ |
73
|
|
|
public function getCurrency() |
74
|
|
|
{ |
75
|
|
|
return $this->currency; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @param string $currency |
80
|
|
|
* |
81
|
|
|
* @return Currency |
82
|
|
|
*/ |
83
|
|
|
public function setCurrency($currency) |
84
|
|
|
{ |
85
|
|
|
$this->currency = $currency; |
86
|
|
|
|
87
|
|
|
return $this; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return string |
92
|
|
|
*/ |
93
|
|
|
public function getName() |
94
|
|
|
{ |
95
|
|
|
return $this->name; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @param string $name |
100
|
|
|
* |
101
|
|
|
* @return Currency |
102
|
|
|
*/ |
103
|
|
|
public function setName($name) |
104
|
|
|
{ |
105
|
|
|
$this->name = $name; |
106
|
|
|
|
107
|
|
|
return $this; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @return bool |
112
|
|
|
*/ |
113
|
|
|
public function isDefault() |
114
|
|
|
{ |
115
|
|
|
return $this->default; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @param bool $default |
120
|
|
|
* |
121
|
|
|
* @return Currency |
122
|
|
|
*/ |
123
|
|
|
public function setDefault($default) |
124
|
|
|
{ |
125
|
|
|
$this->default = $default; |
126
|
|
|
|
127
|
|
|
return $this; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @return float |
132
|
|
|
*/ |
133
|
|
|
public function getFactor() |
134
|
|
|
{ |
135
|
|
|
return $this->factor; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @param float $factor |
140
|
|
|
* |
141
|
|
|
* @return Currency |
142
|
|
|
*/ |
143
|
|
|
public function setFactor($factor) |
144
|
|
|
{ |
145
|
|
|
$this->factor = $factor; |
146
|
|
|
|
147
|
|
|
return $this; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @return string |
152
|
|
|
*/ |
153
|
|
|
public function getSymbol() |
154
|
|
|
{ |
155
|
|
|
return $this->symbol; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @param string $symbol |
160
|
|
|
* |
161
|
|
|
* @return Currency |
162
|
|
|
*/ |
163
|
|
|
public function setSymbol($symbol) |
164
|
|
|
{ |
165
|
|
|
$this->symbol = $symbol; |
166
|
|
|
|
167
|
|
|
return $this; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* @return int |
172
|
|
|
*/ |
173
|
|
|
public function getSymbolPosition() |
174
|
|
|
{ |
175
|
|
|
return $this->symbolPosition; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* @param int $symbolPosition |
180
|
|
|
* |
181
|
|
|
* @return Currency |
182
|
|
|
*/ |
183
|
|
|
public function setSymbolPosition($symbolPosition) |
184
|
|
|
{ |
185
|
|
|
$this->symbolPosition = $symbolPosition; |
186
|
|
|
|
187
|
|
|
return $this; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* @return int |
192
|
|
|
*/ |
193
|
|
|
public function getPosition() |
194
|
|
|
{ |
195
|
|
|
return $this->position; |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* @param int $position |
200
|
|
|
* |
201
|
|
|
* @return Currency |
202
|
|
|
*/ |
203
|
|
|
public function setPosition($position) |
204
|
|
|
{ |
205
|
|
|
$this->position = $position; |
206
|
|
|
|
207
|
|
|
return $this; |
208
|
|
|
} |
209
|
|
|
} |
210
|
|
|
|